Jump to content
  • Advertisement
Sign in to follow this  
lomateron

emitting a system-interpreted value which is not written in every execution path of the shader

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

I am having a problem with this part of my code:

 

struct PS_Ff
{
    float4 Pos : SV_POSITION;
    float4 Frc : FFOO;
};
 
inside my geometry shader:
 


[maxvertexcount(17)] 
void GSInstJoFo( point VS_PPLL input[1] , inout PointStream<PS_Ff> duo )
{
    //.........random code..........
    //.........................................
    //........................................

    uint arrJP[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    uint nJo=uint(Tex2Dg.Load(uint3(0,0,0)));
    
    float4 jnts=(float4)0;
    uint fl;
    for(i=0;i<nJo;i++)
    {
       jnts = Tex2Dc.Load(uint3(i,0,0));

       fl=i%4;
       arrJP=uint(jnts[fl]);
    }

    PS_Ff output;
    output.Frc=float4(0.0f,0.0f,0.0f,0.0f);

    uint3 u=uint3(arrJP%100,arrJP/100,0); //<------because it thinks arrJP can be undefined
    output.Pos.x=float(u.x);          //<------------------------------this is the problem
    output.Pos.y=float(u.y);         //<------------------------------this is the problem
    output.Pos.zw=float2(0.0f,1.0f);

    duo.Append( output );
    duo.RestartStrip();
}

 

 
Is there any way I can make an if() in the ...output.Pos.x=......output.Pos.y=...part to take that geometry shader error away?
Edited by lomateron

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!