Skip to content
Snippets Groups Projects
Commit b563c773 authored by Alexander Rose's avatar Alexander Rose
Browse files

avoid using flat qualifier in shaders

- causing slowdown
parent dcda649d
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ Note that since we don't clearly distinguish between a public and private interf
- Bind shared textures only once per pass, not for each render item
- Fix missing 'material' annotation for some uniforms, causing unnecessary uniform updates
- Remove use of ``isnan`` in impostor shaders, not needed and causing slowdown
- Avoid using ``flat`` qualifier in shaders, causing slowdown
## [v3.11.0] - 2022-07-04
......
......@@ -14,10 +14,10 @@ uniform int uMarkingType;
uniform vec3 uClipObjectScale[dClipObjectCount];
#if defined(dClipping)
#if __VERSION__ == 100
#if __VERSION__ == 100 || defined(dClippingType_instance)
varying float vClipping;
#else
flat in float vClipping;
flat in float vClipping; // avoid if possible, causes slowdown, ASR
#endif
#endif
#endif
......@@ -32,10 +32,10 @@ uniform int uMarkingType;
#if defined(dNeedsMarker)
uniform float uMarker;
#if __VERSION__ == 100
#if __VERSION__ == 100 || defined(dMarkerType_instance)
varying float vMarker;
#else
flat in float vMarker;
flat in float vMarker; // avoid if possible, causes slowdown, ASR
#endif
#endif
......
......@@ -21,10 +21,10 @@ uniform int uPickType;
#if defined(dClipping)
uniform vec2 uClippingTexDim;
uniform sampler2D tClipping;
#if __VERSION__ == 100
#if __VERSION__ == 100 || defined(dClippingType_instance)
varying float vClipping;
#else
flat out float vClipping;
flat out float vClipping; // avoid if possible, causes slowdown, ASR
#endif
#endif
#endif
......@@ -33,10 +33,10 @@ uniform int uPickType;
uniform float uMarker;
uniform vec2 uMarkerTexDim;
uniform sampler2D tMarker;
#if __VERSION__ == 100
#if __VERSION__ == 100 || defined(dMarkerType_instance)
varying float vMarker;
#else
flat out float vMarker;
flat out float vMarker; // avoid if possible, causes slowdown, ASR
#endif
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment