summaryrefslogtreecommitdiff
path: root/drivers/gles3/shader_compiler_gles3.cpp
AgeCommit message (Collapse)Author
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
2018-01-12Fix uniform alignment, closes #14962Juan Linietsky
2018-01-10Shader Language: Fixes EXTRA_MATRIX undefined.AlmightyScientist
Fixes #15453.
2018-01-06Improve detection of variable writing in shader, fixes #15177Juan Linietsky
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
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.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-26Fix sidedness check in material. Also remove SIDE built-in.Juan Linietsky
2017-12-14Fixes built-In "LIGHT" causing fragment compilation errorArnaud PEZEL
Add a rename for shader LIGHT built-in, Fix bug #14537
2017-12-10PropertyEditor: Filter out resource_local_to_sceneRémi Verschelde
This lets the empty "Global" category disappear again. Also silence a debug print.
2017-11-27Added interpolation modifiers to shaderlangScayze
2017-11-14Enable light shaders when light variables are usedGeorge Marques
2017-10-30Merge pull request #12288 from tagcup/expose_viewport_sizeJuan Linietsky
Expose VIEWPORT_SIZE in shader language.
2017-10-27Fix shader compiler typo gl_FrotFaceScayze
2017-10-26Expose VIEWPORT_SIZE in shader language.Ferenc Arn
Fixes #11710.
2017-10-23Revert "Rename Schlick GGX to GGX."Rémi Verschelde
2017-10-21Rename Schlick GGX to GGX.Ferenc Arn
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.
2017-10-14Fix render mode specular schlick ggxHiroshi Ogawa
2017-09-29Ability to set a custom FOV makes it possible to use sky on orthogonal view. ↵Juan Linietsky
Closes #9186
2017-09-27Fixes to light shaders, should work now..Juan Linietsky
2017-09-23Added light affect parameter to baked AOJuan Linietsky
2017-09-21Added proximity and distance fade to SpatialMaterialJuan Linietsky
2017-09-13Style: Apply clang-format to @reduz's changesRémi Verschelde
[ci skip]
2017-09-05Added support for for, break and continue. Closes #10560, closes #10661Juan Linietsky
2017-09-03Added transmission shader parameter.Juan Linietsky
2017-08-29removed DISCARD built in variable, replaced by actual discard GLSL ↵Juan Linietsky
instruction, fixes #9677
2017-08-27Dead code tells no talesRémi Verschelde
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-08-Restored Sprite3D to working function, fixes #2061, fixes #9738Juan Linietsky
-Restored an alpha scissor property in Material
2017-07-08Some adjustments to toon material to make it more flexibleJuan Linietsky
Ability to also disable specular