Forums - Adreno 630 glsl problem

1 post / 0 new
Adreno 630 glsl problem
deias21
Join Date: 8 Apr 16
Posts: 1
Posted: Mon, 2018-10-08 04:46

Hi.

I have noticed some strange behaviour on phones using Adreno 630 GPU.  It usually happens when multiplying some vector variable that contains color with a vec4 uniform i.e 

Example1:

// _MidLightColor is a vec4 uniform

color_out.rgb *= _MidLightColor.rgb; // This results in a black color

color_out.rgb *= saturate(_MidLightColor.rgb); // This results in proper color

Example2:

In this case I must absolutely set alpha value to 1, otherwise the result is again black.(No alpha blend is used)

//_TintColor and _BlendFactor are uniforms

// lumeColor is a varialbe

//  a_color0 is an attribute

vec4 tinted = lumaColor * _TintColor;

float blend = mix(1.0, _BlendFactor.x, a_color0.a);

v_color0 = mix(tinted, a_color0, blend);

v_color0.a = 1.0; // must be set to 1

On all other phones this code works correctly. Any clue whats going on ?

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.