shader question re: texcoords

This forum is currently in read-only mode.
  • while some aspects of the shader implementation in construct (like the way parameters are specified, fore- and background-textures and the technique are named) are obvious from looking at the examples, i'm having trouble porting other shaders. mostly because of the omitted vertexshader, which breaks some of them in unexpected ways (related to world, view & projection spaces) that probably originate in wrong texture coordinates.

    in which way are texture coordinates handled in construct? which spaces are handed to the pixelshader? and are there any hooks in the implementation concerning sampler states / address modes?

    thanks for your time...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Effects run by being rendered to a window-sized render target, then transferred to the back buffer. The area processed is the object bounding box. So your texture coordinates are just the area of the bounding box in the window-sized texture. You can use the parameters detailed here to find these values in the shader.

    Construct does all vertex calculations in software so there is no need for any vertex shader, although this means you may have to adapt the code.

    You can set render states etc. like normal in shaders. Check out the additive (PS 0.0) effect, all it does is change render states (which is what 'PS 0.0' means - render states only).

  • thanks! i completely missed out on the wiki page

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