Commit Graph

8 Commits

Author SHA1 Message Date
Clément Foucault
3064906eb7 Cleanup: GPU: Add ATTR_FALLTHROUGH for shader C++ compilation 2025-04-03 16:38:21 +02:00
Brecht Van Lommel
c7502b092d Cleanup: Various clang-tidy warnings in gpu
Pull Request: https://projects.blender.org/blender/blender/pulls/133734
2025-01-31 17:03:18 +01:00
Clément Foucault
bda911bcaa GPU: GLSL C++ Stub: Add packed type and small types 2024-11-29 21:33:06 +01:00
Clément Foucault
5c80fb17e0 GPU: Add support for shader assert
This allows to use `assert()` directly inside shader source.

The current implementation is just replacing it with a printf
that gives some information about the location of the assert.

It is not that much more helpful than a printf with a condition.
What is useful is that they are disabled by default. So they
can be sprinkle around and only turned on during debugging.

Adding shader name inside the assert report is not trivial and
could be added later (the shader name is only known at compile
time which is too late for string parsing).

Adding which drawcall produced the assert isn't trivial either.
It would require flushing the printf buffer for each drawcall
which might force synchronization and remove bugs.

Pull Request: https://projects.blender.org/blender/blender/pulls/129728
2024-11-06 20:29:01 +01:00
Clément Foucault
09fb4b498a GPU: Add more stubs for C++ shader compilation 2024-10-31 13:13:15 +01:00
Clément Foucault
dcd80dbe15 GPU: GLSL C++ stubs
Allows to compile GLSL code using a C++ compiler. The end result is that
IDE features such as autocompletion and error detection can work with
the GLSL codebase.

Rel #127983

Pull Request: https://projects.blender.org/blender/blender/pulls/128598
2024-10-04 17:44:24 +02:00
Clément Foucault
e0b3dee35a EEVEE-Next: Jittered Soft Shadows
Jittered Soft Shadows support.
Improves soft shadow quality at the cost of re-rendering shadow maps every sample.
Disabled by default in the viewport unless enabled in the Scene settings.

| Tracing-only | Jitter-only | Jitter+Over-blur |
| --- | --- | --- |
| ![imagen](/attachments/e5ca6120-0666-4e86-b6e0-3d7512587b86) | ![imagen](/attachments/a72631aa-14f8-4e10-a748-848fc4bd4ab2) | ![imagen](/attachments/07c5de65-61d2-48e7-b78c-9c3cbdcaf844) |

Tracing-only is the method used by default in EEVEE-Next.
Jitter-only is the method used by EEVEE-Legacy Soft Shadows.
Jitter+Over-blur combines both.

Co-authored by Miguel Pozo @pragma37 (initial patch #119753)

Pull Request: https://projects.blender.org/blender/blender/pulls/121836
2024-05-18 17:21:47 +02:00
Hans Goudey
8b514bccd1 Cleanup: Move remaining GPU headers to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/119807
2024-03-23 01:24:18 +01:00