• Advertisement
Sign in to follow this  

Convert 2D Post Process targeting Cube Texture / Sky Box

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

Hello guys,

 

I want to apply a post process shader effect (procedural starfield) that I have written to a sky box cube map, which is currently not really possible because the effect is made for pure 2D / screen space purposes. How would I convert or apply it to my sky shader which currently queries its color data using texCUBE()?

 

I'm working with DX9 and pure HLSL, no CPU-side / host application processing possible.

 

Any ideas?

Share this post


Link to post
Share on other sites
Advertisement

the effect is made for pure 2D / screen space purposes

Why not taking the screen coords (2d in pixel shader, in DX9 take a look at VPOS) as input to your starfield algorithm while rendering the skybox.

Edited by Ashaman73

Share this post


Link to post
Share on other sites

Why not taking the screen coords (2d in pixel shader, in DX9 take a look at VPOS) as input to your starfield algorithm while rendering the skybox.

 

What do you mean by "screen coords"? My sky shader gets the UV input pixel coords (xy) which are the coords relative to the skybox, but I don't have the actual screen position of the current processed pixel in that context. Furthermore, if I had that wouldn't help because the sky then wouldn't rotate as it should when the camera moves.

 

I need to "draw" the generated starfield onto the skybox in order for it to display correctly under any conditions.

Edited by Meltac

Share this post


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

  • Advertisement