summaryrefslogtreecommitdiff
path: root/drivers/gles3/shader_compiler_gles3.cpp
AgeCommit message (Collapse)Author
2021-10-31Use OpenGL 3.3 core profile instead of compatibility profileClay John
- Rename OpenGL to GLES3 in the source code per community feedback. - The renderer is still exposed as "OpenGL 3" to the user. - Hide renderer selection dropdown until OpenGL support is more mature. - The renderer can still be changed in the Project Settings or using the `--rendering-driver opengl` command line argument. - Remove commented out exporter code. - Remove some OpenGL/DisplayServer-related debugging prints.
2020-02-13Remove obsolete GLES3 backendRémi Verschelde
Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
2020-02-11Completed material/2D shader support (missing SCREEN_TEXTURE)Juan Linietsky
2020-01-31Fix shader crash if using multiple underscores in identifier namesYuri Roubinsky
2020-01-21Remove unused #if 0'ed codeRémi Verschelde
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-10Add a default POINT_SIZEclayjohn
2019-09-19Merge pull request #31202 from azagaya/light-dataRémi Verschelde
Create shadow_vec for altering shadow computation
2019-09-14Implement shader array support for varyingsChaosus
2019-09-06Create shadow_vec for altering shadow computationazagaya
In 2.1 and 3.0, light_vec could be modified for altering shadow_computations. But it broke shadows when rotating light. shadow_vec would do the same, but without breaking shadows in rotated lights if not used. Add inverse light transformation to shadow vec, so it's not affected when rotating lights; Added usage define for shadow vec. For shadow vec working properly when rotating a light, it's needed to multiply it by light_matrix normalized. Added usage define in order to don't do that if shadow_vec not used.
2019-08-23Implements switch to shadersYuri Roubinski
2019-08-19Fix ternary operator shader compiler expressionYuri Roubinski
2019-08-13Implemented do/while loops for shadersYuri Roubinski
2019-08-05Implemented local shader constantsYuri Roubinski
2019-07-16Added local array initializerChaosus
2019-07-15Implemented local shader arraysChaosus
2019-06-01Added constant support to shadersChaosus
Co-authored-by: DavidSichma <sichmada@gmail.com>
2019-05-21Implement shadow to opacityBastiaan Olij
2019-02-13Fix typos with codespellRémi Verschelde
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 ```
2019-01-30Fix many asan and ubsan reported issuesHein-Pieter van Braam
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
2019-01-28Cleanup and identify ShaderCompilerGLES[23] differencesRémi Verschelde
2019-01-17Fix shader compile error line numbers starting at 0.RedMser
2019-01-04Merge pull request #24539 from BastiaanOlij/override_gl_positionRémi Verschelde
Override GL_position
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-29Override GL_positionBastiaan Olij
2018-12-11Merge pull request #23126 from QbieShay/nine_uvRémi Verschelde
UV for ninepatch now maps to the proper ninepatch mapped UV.
2018-12-01Remapped ACTIVE to shader_active, now worksBastiaan Olij
2018-11-22Added PROCESSED_UV for accessing ninepatch processed uv in the shaderQbieShay
2018-11-21Removed noperspective (not in GLSL ES 3.0), do not write smooth if not ↵Juan Linietsky
specified. Fixes #20435
2018-11-19Fixed how floats are printed to the GLSL shader, closes #19803Juan Linietsky
2018-11-14Cleaned up and fixed the base_changed function in rasterizers, also fixes #15617Juan Linietsky
2018-11-10Avoid double underscore from breaking glsl compiler, fixes #12880Juan Linietsky
2018-10-06Added the ability to write to gl_FragDepth. It doesn't affect the depth prepass.QbieShay
2018-09-27Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde
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.
2018-09-23-Rewrote GLES2 lighting and shadows and optimized state changes, did many ↵Juan Linietsky
optimizations, added vertex lighting. -Did some fixes to GLES3 too
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
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.
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-08Merge pull request #20681 from DavidSichma/masterJuan Linietsky
Keeping track of discard
2018-08-02Keeping track of discardDavid Sichma
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.
2018-07-30add 3D texturesThomas Herzog
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
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.
2018-07-22Shader lang: Properly assign INSTANCE_ID to gl_InstanceIDRémi Verschelde
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.
2018-07-17Add disable ambient light flag to shaders and materialsAlex Roman
2018-06-21Add render mode to ensure correct normals when using non-uniform scalingJFonS
2018-05-07Merge pull request #17845 from JFonS/disable_spatial_shadowsJuan Linietsky
Added flag on SpatialMaterial to disable shadows
2018-04-13Fixes canvas light shaders.Pieter-Jan Briers
Fixes #16904 Restore more out functionality, fix built-ins. Requested changes, I think?
2018-03-29Added flag on SpatialMaterial to disable shadowsJFonS
2018-02-07using TIME in light shader enables uses_fragment_timekarroffel
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.
2018-01-12Fix mat2 alignmentbinbitten
2018-01-12Fix mat2 alignmentJuan Linietsky