diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-08-29 15:03:13 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-09-12 14:29:39 +0300 |
commit | bc4a0aa611242083403fd11f791f51cbab8d4f3a (patch) | |
tree | 3fa11a231a382513560f84db5a8b7999dd84d94b /res | |
parent | 18138ffc6b063e94b792ef61cbe310f90ea21287 (diff) |
Implement two-pass rendering for transparent objects
If object has both opaque parts and transparent parts it will be rendered
incorrectly due to no z-buffering. Add two-pass method to render the
opaque and transparent parts separately.
- Add opaque pixel check to transparency check of images.
- Add alpha test rendering to default material shadows too.
Task-number: QT3DS-3515
Change-Id: I9700b8fb463df9143c5bb9cbe66c7570081ebf5c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'res')
-rw-r--r-- | res/effectlib/tessellationNPatch.glsllib | 2 | ||||
-rw-r--r-- | res/effectlib/tessellationPhong.glsllib | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/res/effectlib/tessellationNPatch.glsllib b/res/effectlib/tessellationNPatch.glsllib index 62ec263..94efcf6 100644 --- a/res/effectlib/tessellationNPatch.glsllib +++ b/res/effectlib/tessellationNPatch.glsllib @@ -213,7 +213,7 @@ bool doLinear(int i, int j) vec4 tessShader ( ) { - // pre compute square tesselation coord + // pre compute square tessellation coord vec3 tessSquared = gl_TessCoord * gl_TessCoord; vec3 tessCubed = tessSquared * gl_TessCoord; diff --git a/res/effectlib/tessellationPhong.glsllib b/res/effectlib/tessellationPhong.glsllib index 98a683d..bde9f68 100644 --- a/res/effectlib/tessellationPhong.glsllib +++ b/res/effectlib/tessellationPhong.glsllib @@ -138,7 +138,7 @@ uniform float phongBlend; vec4 tessShader ( ) { - // pre compute square tesselation coord + // pre compute square tessellation coord vec3 tessSquared = gl_TessCoord * gl_TessCoord; // barycentric linear position |