summaryrefslogtreecommitdiffstats
path: root/servers/rendering/shader_types.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@d09d82d433b03bb3773fd2a8cc8d6ccc2f8739ceSpartan3222024-11-261-0/+1
|\
| * Allow `SCREEN_UV` to be used in light function of spatial shaderChaosus2024-11-191-0/+1
| |
* | Merge pull request #818 from Spartan322/fixup/copyright-headersGeorge L. Albany2024-10-271-2/+2
|\ \ | | | | | | Fix copyright headers referring to Godot
| * | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| | |
* | | Merge commit godotengine/godot@61accf060515416da07d913580419fd8c8490f7bSpartan3222024-10-261-7/+2
|\ \ \ | |/ / |/| / | |/
| * Make `OUTPUT_IS_SRGB/CLIP_SPACE_FAR` shader built-ins globalChaosus2024-10-241-7/+2
| |
* | Merge commit godotengine/godot@1015a481ff43edb1126ab39a147fefda290131e5Spartan3222024-10-241-0/+2
|\|
| * Allow using stage functions inside custom shader functionsYuri Rubinsky2024-10-171-0/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Add `CLIP_SPACE_FAR` built-in to spatial shaderChaosus2024-08-271-0/+3
|
* Prevent changing some built-ins in spatial shadersYuri Rubinsky2024-06-171-16/+16
|
* Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-2/+2
| | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* reverted naming to premul alpha (no T)QbieShay2024-05-011-2/+2
| | | | | | | Initially 3d had premulT alpha as a keyword. Since Canvas item uses mixed premul and premult as keywords, 3D is changed as well to keep consistency with 2D. Unfortunately this keeps inconsistency with the internal ENUM.
* Added premult alpha blending to 3D (spatial) shaders.QbieShay2024-05-011-1/+2
| | | | | Co-authored-by: jitspoe <jitspoe@yahoo.com> Co-authored-by: Clay John <claynjohn@gmail.com>
* Add LIGHT_VERTEX to fragment shaderRob Blanckaert2024-04-251-0/+1
| | | | | Adds a new variable to the fragment shader to specify the vertex position used when calculating lighting.
* Fix shadows for billboarded Sprite3D'sErik Johnson2024-02-131-0/+1
|
* Add custom shader attributes to Canvas Item ShadersGiwayume2024-01-231-0/+2
|
* Make AMOUNT_RATIO constant in the shader language specification.clayjohn2023-11-191-2/+2
| | | | Writing to it doesn't do anything and will crash the compatibility backend.
* Particle internal refactor and additions for more artistic controlQbieShay2023-10-101-0/+6
| | | | | | | | Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro> Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Co-authored-by: Raul Santos <raulsntos@gmail.com> Co-authored-by: Mew Pur Pur <85438892+MewPurPur@users.noreply.github.com> Co-authored-by: Clay John <claynjohn@gmail.com>
* Merge pull request #81160 from paddy-exe/canvas-uv-world-spaceRémi Verschelde2023-09-191-0/+1
|\ | | | | | | Add render mode to use world coordinates in canvas item shader
| * Add option to use world coordinates in canvas item shaderPatrick2023-08-301-0/+1
| | | | | | | | By using the render mode `world_vertex_coords` you can automatically use the vertex coordinates in world space
* | Implement render mode fog_disabled and BaseMaterial3D setting Disable FogMilan Gruner2023-09-051-0/+1
|/
* Merge pull request #76565 from clayjohn/debug-PSSM-splitsRémi Verschelde2023-05-151-0/+1
|\ | | | | | | Re-implement the PSSM_SPLITS debug option
| * Re-implement the PSSM_SPLITS debug optionclayjohn2023-04-281-0/+1
| | | | | | | | This uses a render_mode instead of shadow_color to avoid adding a cost to the basic shader
* | Add SPECULAR_AMOUNT spatial light shader built-inJohan Aires Rastén2023-05-041-0/+1
|/ | | | | | | Light3D has a light_specular property which is used to set the intensity of specular contributed by this light source, but it was previously only used by the default material light shader, and not possible to use in a custom light() shader.
* Add LIGHT_IS_DIRECTIONAL built-in for spatial shadersJohan Aires Rastén2023-04-201-0/+1
|
* Add EXPOSURE built in to spatial shadersclayjohn2023-04-121-0/+1
| | | | This allows users to restore light values to pre-pre-exposure amounts
* Merge pull request #72485 from BastiaanOlij/add_eye_matrix_accessRémi Verschelde2023-02-011-0/+2
|\ | | | | | | Expose EYE_OFFSET to gdshader code
| * Expose EYE_OFFSET to gdshader codeBastiaan Olij2023-02-011-0/+2
| |
* | Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and ↵Marius Hanl2023-01-311-1/+1
|/ | | | | | | | | | | GPUParticles*3D - Extents are replaced by Size (Size is Extents * 2) - The UI text displays 'Size' - Snapping is adjusted to work with Size - _set and _get handle extents for compatibility Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
* Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTUREclayjohn2023-01-181-4/+0
| | | | in favour of texture hints
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Implement CAMERA_VISIBLE_LAYERS as built-in shader variableNumbuhFour2022-12-031-0/+2
|
* Merge pull request #66178 from clayjohn/double-precision-renderingRémi Verschelde2022-09-301-2/+2
|\ | | | | | | Emulate double precision for regular rendering operation when REAL_T_IS_DOUBLE
| * Emulate double precision for regular rendering operation.clayjohn2022-09-201-2/+2
| | | | | | | | | | We calculate the lost precision on the CPU and pass it into the GPU so that it can calculate an error-corrected version of the vertex position
* | Clean up canvas light shader API.clayjohn2022-09-281-0/+3
|/ | | | | Expose LIGHT_ENERGY and LIGHT_IS_DIRECTIONAL. Add LIGHT_DIRECTION
* Merge pull request #65654 from JohanAR/emit_subparticle_from_startRémi Verschelde2022-09-141-0/+6
|\ | | | | Allow emit_subparticle from start function
| * Allow emit_subparticle from start functionJohan Aires Rastén2022-09-111-0/+6
| | | | | | | | | | emit_subparticle was previously only allowed from the process function in a particle shader, which seemed like an unnecessary limitation.
* | Move debanding into internal sky shader code so that it is applied after ↵clayjohn2022-09-131-0/+1
|/ | | | | | everything else. This ensures that the debanding does not scale with exposure or any other effect.
* Add spatial built-ins (camera-pos, object-pos, camera-eye etc.)Patrick Exner2022-08-021-0/+10
|
* Use IGN instead of white noise for sky ditheringclayjohn2022-05-241-0/+1
|
* Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Add dedicated macros for property name extractionHaoyu Qiu2022-05-191-31/+31
| | | | | | | * Replace case-by-case extraction with PNAME & GNAME * Fix group handling when group hint begins with property name * Exclude properties that are PROPERTY_USAGE_NO_EDITOR * Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
* Replace most uses of Map by HashMapreduz2022-05-161-2/+2
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Remove `SHADOW_ATTENUATION` spatial light shader built-inYuri Roubinsky2022-03-291-1/+0
|
* Rename several transform built-ins in shadersYuri Roubinsky2022-03-181-12/+12
|
* Use Filament specular models and parametrizationclayjohn2022-02-221-2/+2
|
* Add Particle Shader Userdatareduz2022-02-151-0/+12
| | | | | * Adds optional vec4 USERDATA1 .. USERDATA6 to particles, allowing to store custom data. * This data is allocated on demand, so shaders that do not use it do not cost more.
* Remove TRANSFORM built in from fog shadersclayjohn2022-01-211-1/+0
|
* Merge pull request #54791 from NHodgesVFX/masterRémi Verschelde2022-01-041-0/+3
|\ | | | | [4.x] add more OpenGL attributes