Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Convert 2D Post Process targeting Cube Texture / Sky Box


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Meltac   Members   -  Reputation: 461

Like
0Likes
Like

Posted 04 August 2014 - 01:55 AM

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?



Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 10261

Like
0Likes
Like

Posted 04 August 2014 - 03:37 AM


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, 04 August 2014 - 03:39 AM.

Ashaman

 

Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log


#3 Meltac   Members   -  Reputation: 461

Like
0Likes
Like

Posted 04 August 2014 - 03:50 AM


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, 04 August 2014 - 03:50 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS