summaryrefslogtreecommitdiff
path: root/drivers/gles2/shader_compiler_gles2.cpp
AgeCommit message (Collapse)Author
2020-01-16Disabled array initialization, const array and arr.length in shadersYuri Roubinsky
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-11-02Removed switch operator from GLES2 shader back-endYuri Roubinsky
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-29Merge pull request #31746 from clayjohn/skip-vertex-transform-gles2Rémi Verschelde
Fix skip_vertex_transform bug in GLES2 CPUParticles
2019-08-28Fix skip_vertex_transform bug in GLES2 CPUParticlesclayjohn
2019-08-26Merge pull request #31556 from Chaosus/gles2_inverseRémi Verschelde
Implemented inverse shader function to GLES2
2019-08-23Implements switch to shadersYuri Roubinski
2019-08-22Implemented inverse shader function to GLES2Yuri 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-31Expose several GLES3 built-ins to GLES2 Chaosus
2019-07-29added round function to gles2clayjohn
2019-07-16Added local array initializerChaosus
2019-07-15Implemented local shader arraysChaosus
2019-07-05Prevent GLES2 bool uniforms from having a precision type set.Marcus Brummer
When setting the default precision type for uniforms (before compiling the shader) prevent boolean uniforms from having one set. Booleans can't have a precision type and on some Android devices this caused a compilation failure. Fixes #30317
2019-06-01Added constant support to shadersChaosus
Co-authored-by: DavidSichma <sichmada@gmail.com>
2019-05-27Merge pull request #29014 from mbrlabs/gles2_precision_fixRémi Verschelde
Use highp precision in the gles2 fragment shader if available
2019-05-25Use highp precision for gles2 shader uniforms if not explicitly set.Marcus Brummer
The use of different default precision values (highp in vertex; mediump in fragment) for uniform variables caused the shader program to not link properly on some android devices/emulators.
2019-05-21Implement shadow to opacityBastiaan Olij
2019-02-24Many separate fixes to ensure non power of 2 textures work on GLES2, closes ↵Juan Linietsky
#25897 and many others
2019-02-22-Support DEPTH_TEXTURE in GLES2, fixes #25106Juan Linietsky
-Fix use of transparent framebuffers in GLES2 -Fix use of ambient color clearing in GLES2 when no environment exists.
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-28GLES2: Define LIGHT Spatial shader builtinRémi Verschelde
Fixes #25421.
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!
2019-01-01Fix missing/malformed license headersRémi Verschelde
2018-12-29Override GL_positionBastiaan Olij
2018-12-02Merge pull request #23899 from BastiaanOlij/fix_particle_activeRémi Verschelde
Remapped ACTIVE to shader_active, now works
2018-12-01Remapped ACTIVE to shader_active, now worksBastiaan Olij
2018-11-30fixed gles2 camera_matrix bugclayjohn
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-09-29Many fixes to GLES2 renderer, fixed compilation issues in GLES3 shaders.Juan Linietsky
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-24[GLES2] fix wrong shader compiler outputThomas Herzog
The `f` postfix was working fine on dekstop GL but not on some mobile drivers.
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-27add initial GLES2 3D rendererkarroffel
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.