summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/shader_compiler_gles3.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Fix many asan and ubsan reported issuesHein-Pieter van Braam2019-01-301-2/+2
| | | | | | | | | This allows most demos to run without any ubsan or asan errors. There are still some things in thirdpart/ and some things in AudioServer that needs a look but this fixes a lot of issues. This should help debug less obvious issues, hopefully. This fixes #25217 and fixes #25218
* Cleanup and identify ShaderCompilerGLES[23] differencesRémi Verschelde2019-01-281-3/+3
|
* Fix shader compile error line numbers starting at 0.RedMser2019-01-171-1/+1
|
* Merge pull request #24539 from BastiaanOlij/override_gl_positionRémi Verschelde2019-01-041-0/+2
|\ | | | | Override GL_position
| * Override GL_positionBastiaan Olij2018-12-291-0/+2
| |
* | Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Merge pull request #23126 from QbieShay/nine_uvRémi Verschelde2018-12-111-1/+1
|\ | | | | UV for ninepatch now maps to the proper ninepatch mapped UV.
| * Added PROCESSED_UV for accessing ninepatch processed uv in the shaderQbieShay2018-11-221-1/+1
| |
* | Remapped ACTIVE to shader_active, now worksBastiaan Olij2018-12-011-1/+1
| |
* | Removed noperspective (not in GLSL ES 3.0), do not write smooth if not ↵Juan Linietsky2018-11-211-2/+1
|/ | | | specified. Fixes #20435
* Fixed how floats are printed to the GLSL shader, closes #19803Juan Linietsky2018-11-191-5/+6
|
* Cleaned up and fixed the base_changed function in rasterizers, also fixes #15617Juan Linietsky2018-11-141-0/+1
|
* Avoid double underscore from breaking glsl compiler, fixes #12880Juan Linietsky2018-11-101-1/+2
|
* Added the ability to write to gl_FragDepth. It doesn't affect the depth prepass.QbieShay2018-10-061-0/+1
|
* Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde2018-09-271-0/+12
| | | | | | | | | | | Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
* -Rewrote GLES2 lighting and shadows and optimized state changes, did many ↵Juan Linietsky2018-09-231-2/+16
| | | | | | optimizations, added vertex lighting. -Did some fixes to GLES3 too
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-2/+0
|
* Merge pull request #20681 from DavidSichma/masterJuan Linietsky2018-08-081-0/+5
|\ | | | | Keeping track of discard
| * Keeping track of discardDavid Sichma2018-08-021-0/+5
| | | | | | | | | | | | | | | | | | | | Shader compilation now keeps track of the discard key word. Previously only variables were monitored. But discard, which needs special treatment in some cases, went unnoticed by the compiler as discard is not a variable but a flow control. This commit adds monitoring for discard.
* | add 3D texturesThomas Herzog2018-07-301-0/+2
|/
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Shader lang: Properly assign INSTANCE_ID to gl_InstanceIDRémi Verschelde2018-07-221-7/+1
| | | | | | | | Note that gl_InstanceID is not supported in OpenGL ES 2.0, so in the gles2 backend we assign it to 0. Also clean up some duplicates/commented out code. Fixes #20088.
* Add disable ambient light flag to shaders and materialsAlex Roman2018-07-171-0/+1
|
* Add render mode to ensure correct normals when using non-uniform scalingJFonS2018-06-211-0/+1
|
* Merge pull request #17845 from JFonS/disable_spatial_shadowsJuan Linietsky2018-05-071-0/+1
|\ | | | | Added flag on SpatialMaterial to disable shadows
| * Added flag on SpatialMaterial to disable shadowsJFonS2018-03-291-0/+1
| |
* | Fixes canvas light shaders.Pieter-Jan Briers2018-04-131-3/+0
|/ | | | | | | | Fixes #16904 Restore more out functionality, fix built-ins. Requested changes, I think?
* using TIME in light shader enables uses_fragment_timekarroffel2018-02-071-7/+8
| | | | | | | | | | | | | | | The GLES3 shader compiler performs certain checks to enable or disable the usage of certain uniform variables (and with that the set-up of UBOs). If the `TIME` variable gets used inside the `vertex` function then the renderer knows that it has to insert that value into the UBO. The same applies to the `fragment` function. The `light` function gets executed inside the fragment shader for every light source that is relevant to the current pixel. If the `TIME` variable gets used in that function then it needs to be present in the fragment-UBO. The check for this was missing, so if a shader uses `TIME` inside `light` but not inside `fragment` then the uniform will not actually be set up.
* Fix mat2 alignmentbinbitten2018-01-121-2/+2
|
* Fix mat2 alignmentJuan Linietsky2018-01-121-2/+4
|
* Fix uniform alignment, closes #14962Juan Linietsky2018-01-121-4/+58
|
* Shader Language: Fixes EXTRA_MATRIX undefined.AlmightyScientist2018-01-101-1/+1
| | | | Fixes #15453.
* Improve detection of variable writing in shader, fixes #15177Juan Linietsky2018-01-061-32/+30
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix sidedness check in material. Also remove SIDE built-in.Juan Linietsky2017-12-261-1/+2
|
* Fixes built-In "LIGHT" causing fragment compilation errorArnaud PEZEL2017-12-141-0/+1
| | | | Add a rename for shader LIGHT built-in, Fix bug #14537
* PropertyEditor: Filter out resource_local_to_sceneRémi Verschelde2017-12-101-1/+0
| | | | | This lets the empty "Global" category disappear again. Also silence a debug print.
* Added interpolation modifiers to shaderlangScayze2017-11-271-2/+13
|
* Enable light shaders when light variables are usedGeorge Marques2017-11-141-0/+4
|
* Merge pull request #12288 from tagcup/expose_viewport_sizeJuan Linietsky2017-10-301-1/+1
|\ | | | | Expose VIEWPORT_SIZE in shader language.
| * Expose VIEWPORT_SIZE in shader language.Ferenc Arn2017-10-261-1/+1
| | | | | | | | Fixes #11710.
* | Fix shader compiler typo gl_FrotFaceScayze2017-10-271-1/+1
| |
* | Revert "Rename Schlick GGX to GGX."Rémi Verschelde2017-10-231-1/+1
| |
* | Rename Schlick GGX to GGX.Ferenc Arn2017-10-211-1/+1
|/ | | | | | | | Schlick's approximation and GGX are orthogonal concepts. Furthermore, it's usage so far has been inconsistent: we don't even use it with anisotropic SchlickGGX, and Burley (Disney) diffuse does use it while its name doesn't indicate it. The use of Schlick's approximation in Burley and GGX is an implementation detail and doesn't need to be reflected to the namig.
* Fix render mode specular schlick ggxHiroshi Ogawa2017-10-141-0/+1
|
* Ability to set a custom FOV makes it possible to use sky on orthogonal view. ↵Juan Linietsky2017-09-291-2/+2
| | | | Closes #9186
* Fixes to light shaders, should work now..Juan Linietsky2017-09-271-0/+7
|