0 Favourites

Some questions about effect creation

This forum is currently in read-only mode.
  • It may sound silly, but could someone give a definition of the following variables?





    It seems straight forward and self-explanatory, but sometimes I get unwanted results or can use whatever I want and get the same result (and not the one I intended). Please, don't laugh at me

    The HLSL intrinsic functions list one called noise. If you look at the reference on msdn, it says that the function ist fully supported with shader model 2 and above. But when I try to use it I get an "cannot map expression..." error, if using a variable as input (noise takes a vector of any size as input). With values as input no error is raised, but the output value is always the same no matter what input values I use.

    no error, but always the same output value:

    a) noise(0.6f)

    b) noise(float2(0.25, 0.5))

    c) float nseed = 1000.6f


    error message:

    a) float nseed = Tex.x


    b) float2 nseed = Tex.xy


    c) float2 nseed = float2(Tex.x, Tex.y)


    d) noise(tex.xy)

    e) noise(float2(Tex.x, Tex.y))

    The only thing I could find on the web was a thread on the msdn-forum, posted 2 years ago, where someone said:

    "noise() is only supported for tx_x_0 profiles, i.e. software shader implemented by D3DX TextureFill functions."

    I have no clue what this means, but the tx_x_0 profile restriction is only shown for shader model 1

    Any ideas?

    And if it comes to the point, that the perlin noise function is not usable, how can I setup my own random noise function?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I don't know what's wrong with the noise() function (maybe it's not really supported under PS 2.0). You can read about Construct's built in shader parameters here though:

    http://sourceforge.net/apps/mediawiki/c ... el_Shaders

  • Thanks for the link, I left this out somehow when looking through the wiki. Exactly the informations I was looking for.

    I still hope, someone may help on the other problem (an algorithm for pseudo random numbers maybe?). I'm not that deep into programming, that's why I ask

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)