Arm Community
Site
Search
User
Site
Search
User
Arm Developer
Documentation
Learning Paths
On-Demand Videos
Groups
Arm Ambassadors
Education Hub
Open Source Software and Platforms
Research Collaboration and Enablement
Forums
AI forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Automotive forum
Compilers and Libraries forum
Embedded and Microcontrollers forum
Internet of Things (IoT) forum
Keil forum
Laptops and Desktops forum
Mobile, Graphics, and Gaming forum
Morello forum
Operating Systems forum
Servers and Cloud Computing forum
SoC Design and Simulation forum
SystemReady Forum
Blogs
AI blog
Announcements
Architectures and Processors blog
Automotive blog
Embedded and Microcontrollers blog
Internet of Things (IoT) blog
Laptops and Desktops blog
Mobile, Graphics, and Gaming blog
Operating Systems blog
Servers and Cloud Computing blog
SoC Design and Simulation blog
Tools, Software and IDEs blog
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Mobile, Graphics, and Gaming forum
random number with mali 400 mp
Jump...
Cancel
Locked
Locked
Replies
7 replies
Subscribers
136 subscribers
Views
5941 views
Users
0 members are here
Mali-GPU
Mali-400
Options
Share
More actions
Cancel
Related
How was your experience today?
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
Fernando Sanchez
over 11 years ago
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
Chris Varnsverry
over 11 years ago
Note: This was originally posted on 23rd November 2012 at
http://forums.arm.com
Hi sanchiski,
Something to take into account regarding the Mali-400 GPU is that we implement floating point in the fragment processor as FP16, which is conformant with the Khronos specification. I would direct you to the forum post
here
, which contains a detailed discussion of the considerations of FP16 on Mali 400. Also note that on T6xx platforms, we use FP32 for fragment precision.
I believe in your case, you are attempting to pass very large numbers to the sin and fract functions, which is resulting in a lack of precision required for the operations. You should consider restricting your numbers to a low range (say, no larger than +-3.14 so that you have the maximum amount of bits for precision).
Please let me know if you have any more questions.
Thanks,
Chris
Cancel
Vote up
0
Vote down
Cancel
Reply
Chris Varnsverry
over 11 years ago
Note: This was originally posted on 23rd November 2012 at
http://forums.arm.com
Hi sanchiski,
Something to take into account regarding the Mali-400 GPU is that we implement floating point in the fragment processor as FP16, which is conformant with the Khronos specification. I would direct you to the forum post
here
, which contains a detailed discussion of the considerations of FP16 on Mali 400. Also note that on T6xx platforms, we use FP32 for fragment precision.
I believe in your case, you are attempting to pass very large numbers to the sin and fract functions, which is resulting in a lack of precision required for the operations. You should consider restricting your numbers to a low range (say, no larger than +-3.14 so that you have the maximum amount of bits for precision).
Please let me know if you have any more questions.
Thanks,
Chris
Cancel
Vote up
0
Vote down
Cancel
Children
No data