This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

random number with mali 400 mp

Note: This was originally posted on 22nd November 2012 at http://forums.arm.com

I am having no success into generating random noise with the MALI 400 MP GPU, the code I'm using is next which works with all the other GPU vendors I've tried.
On this specific GPU will return just a few cross screen dotted thin lines with a wide space between them, instead of the expected random noise.

float rand(vec2 co)
{
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}

void main()
{
vec3 color  = texture2D(u_texture, v_texcoord);
vec3 noise =  vec3( rand(gl_FragCoord.st / 1000.0) );
gl_FragColor = vec4(color + noise, 1.0);
}


Is there something to take into account in this specific GPU hardware?

Thanks
Parents
  • Note: This was originally posted on 23rd November 2012 at http://forums.arm.com

    [font=Arial, sans-serif][size=2]> Also note that on T6xx platforms, we use FP32 for fragment precision.[/size][/font]
    [font=Arial, sans-serif][size=2]
    [/size][/font]
    [font=Arial, sans-serif][size=2]One clarification. We do support highp (fp32) _and_ mediump (fp16). For most fragment operations we recommend using mediump; fp16 is "precise enough" for most color-related operations, and uses less memory bandwidth. If you need fp32 for some operations that is still possible of course.[/size][/font]
    [font=Arial, sans-serif][size=2]
    [/size][/font]
    [font=Arial, sans-serif][size=2]HTH,[/size][/font]
    [font=Arial, sans-serif][size=2]Iso[/size][/font]
Reply
  • Note: This was originally posted on 23rd November 2012 at http://forums.arm.com

    [font=Arial, sans-serif][size=2]> Also note that on T6xx platforms, we use FP32 for fragment precision.[/size][/font]
    [font=Arial, sans-serif][size=2]
    [/size][/font]
    [font=Arial, sans-serif][size=2]One clarification. We do support highp (fp32) _and_ mediump (fp16). For most fragment operations we recommend using mediump; fp16 is "precise enough" for most color-related operations, and uses less memory bandwidth. If you need fp32 for some operations that is still possible of course.[/size][/font]
    [font=Arial, sans-serif][size=2]
    [/size][/font]
    [font=Arial, sans-serif][size=2]HTH,[/size][/font]
    [font=Arial, sans-serif][size=2]Iso[/size][/font]
Children
No data