diff options
author | Määttä Antti <antti.maatta@qt.io> | 2017-11-30 12:41:44 +0200 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2018-01-10 12:41:04 +0000 |
commit | a15e4a54f78e330c613a2e63d8004169c05d94be (patch) | |
tree | 5f3f58b9a0cc2a1dd547ccc3276f28c49fa7c9cf /src/Runtime/res/effectlib/fileBumpTexture.glsllib | |
parent | 16185339fc737bfabb415265cdc9beef7146407e (diff) |
Improve custom material GLES2 support
Implement light shader property setting for custom materials when constant
buffers are not supported. Remove floating point .f from glsllib.
Task-number: QT3DS-36
Change-Id: I30df0ef8841daaa166910c2384613a1c9f4e6b46
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Runtime/res/effectlib/fileBumpTexture.glsllib')
-rw-r--r-- | src/Runtime/res/effectlib/fileBumpTexture.glsllib | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Runtime/res/effectlib/fileBumpTexture.glsllib b/src/Runtime/res/effectlib/fileBumpTexture.glsllib index 0f27fd80..d0129a81 100644 --- a/src/Runtime/res/effectlib/fileBumpTexture.glsllib +++ b/src/Runtime/res/effectlib/fileBumpTexture.glsllib @@ -83,7 +83,7 @@ vec3 fileBumpTexture( in sampler2D sampler, in float factor, in int bumpSource // currently no lod supported we use 3.3 GL //float lod = textureQueryLod( sampler, uvw.position.xy ).x; vec2 size = mix( vec2( textureSize( sampler, int( floor( lod ) ) ) ), vec2( textureSize( sampler, int( ceil( lod ) ) ) ), fract( lod ) ); - vec2 unitStep = 1.0f / size; + vec2 unitStep = 1.0 / size; // Add an inveres scale to keep the original gradient values // this makes the bumps a lot smoother. |