XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

noise primitive does not work correctly in fx_4_0

Last post 03-29-2008 10:59 AM by David Hunt. 4 replies.
  • 03-27-2008 5:47 AM

    noise primitive does not work correctly in fx_4_0

    the noise primitive only appears to provide 1d noise when used in fx_4_0.  All other dimensions appear to get mapped down to 1d, which is wrong.

    noise(float arg); // works

    noise(float2 arg); // does not return 2d noise

    noise(float3 arg); // does not return 3d noise

    noise(float4 arg); // does not return 4d noise

     

     

  • 03-27-2008 11:41 AM In reply to

    Re: noise primitive does not work correctly in fx_4_0

    Can you give us more information? Perhaps a small repro shader? Presumably "arg" is known at compile-time, since we don't have a noise instruction, nor do we have a preshader in fx_4_0.
  • 03-29-2008 9:25 AM In reply to

    Re: noise primitive does not work correctly in fx_4_0

    I am confused by your response.  There is a noise instruction in HLSL.

    noise (DirectX HLSL)

    Generates a random value using the Perlin-noise algorithm.

    When compiling under fx_4_0 it only generates 1d noise, regardless of the number of dimensions in the vector passed to it.

  • 03-29-2008 10:05 AM In reply to

    Re: noise primitive does not work correctly in fx_4_0

    It may be helpful if you can tell us what you exactly mean with “1d noise“. Do you talk about that noise always return only a scalar value no matter how many elements the input vector has? Or does it only respect the value from the first element of the vector to calculate the noise?

  • 03-29-2008 10:59 AM In reply to

    Re: noise primitive does not work correctly in fx_4_0

    What, exactly, is a "2d noise"? The noise intrinsic always returns a single scalar value, so if you're expecting it to return a vector, then you're mistaken.

    If you are saying that the scalar value being returned is only using a single value from the input vector, then please post a small repro example with your test input and results.

     

Page 1 of 1 (5 items) Previous Next