Jump to content
  • Advertisement
Sign in to follow this  
Chicki

Point sprites - cg shader

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

hi i got a problem with my particle shader, its ignoring PSIZE. it only works with "glPointSize(Size)", but i cant change this value in vertex shader.

struct input 
{
    float4 pos : POSITION;
    float4 color : COLOR0;
    float size : PSIZE;
};

struct output 
{
    float4 pos : POSITION;
    float4 color : COLOR0;
    float size : PSIZE;
};

output main(input IN)
{
    output OUT;

    OUT.color= IN.color;

    OUT.size = 0.0f;

    OUT.pos = mul(glstate.matrix.mvp,IN.pos);

    return OUT;
}



any ideas? thx

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by griffin2000
Can't speak for OpenGL but in DX there is a renderstate that must be explicitally enabled for this to work.


hm i searched a bit the web for that, but it seems that there is no explicit renderstate to enable for opengl. also it works fine in c++ source code, but not in shader, so i think all necessary states are activated.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!