Sign in to follow this  

cg shader

This topic is 4303 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
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

This topic is 4303 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this