Jump to content
  • Advertisement
Sign in to follow this  
gerbille

cg shader

This topic is 4644 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello! I have a problem with my cg shader. In the cg tutorial book I read that there exists a noise function within cg but when I use it I only get a cyan object. I also used other input values to the noise function but with no different result. VertexOut main(VertexIn In, uniform float4x4 modelViewProj) { VertexOut Out; Out.position = mul(modelViewProj, In.position); Out.color = float4(noise(In.position.x+0.3f),1.0f,1.0f,1.0f); return Out; } Whats wrong in this shader? How to use the predefined noise function from cg? Does someone has a demo? gerbille

Share this post


Link to post
Share on other sites
Advertisement
The noise function is not actually implemented on most (all?) cards yet. If you want to get noise in a shader than currently you have to use a precalculated nD noise texture (where n is the dimensionality of the noise you want to generate).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!