Jump to content
  • Advertisement
Sign in to follow this  
yk_cadcg

[hlsl 10, MRT] can't output[i]=...?

This topic is 4234 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, in ps I use for(..) { output.color = ..; i = (i + 1) % N; .. } and get: "warning X3550: array reference cannot be used as an l-value; not natively addressable, forcing loop to unroll" Questions: 1. how to let shader still run in spite of warning? 2. Is there no way to output.color[L-value]? that means I have to do MRT like if(i ==0) color[0] = c; if(i==1) color[1] = c; if(i==2) color[2] = c; ... //3 is solved by: struct PS_OUTPUT { uint4 color[2] : SV_Target; uint yetAnotherColor : SV_Target2; //notice here is not SV_Target; float depth : SV_Depth; }; [solved]3. I have 3 MRTs, 2 of uint4, 1 of uint. How do I claim PS_OUTPUT? I do like this, I don't know if it's right: struct PS_OUTPUT { uint4 color[2] : SV_Target; uint yetAnotherColor : SV_Target; float depth : SV_Depth; }; Thanks! ps. hlsl warning is hard to understand, and sdk doesn't cover all. Is there any reference? Thanks! [Edited by - yk_cadcg on May 14, 2007 6:17:13 AM]

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!