#1 2015-12-23 16:27:55

bobsimov
Member

Light Shafts

How can i allow the sun to have God Rays ?

Last edited by bobsimov (2015-12-24 11:36:21)

Offline

#2 2015-12-24 08:26:13

chasester
Member

Re: Light Shafts

Why would you want that 0.0 do you mean god rays?
God Rays

Then look at this. This would be done through shaders. Keep in mind that the following is written in sauerbraten and the shaders are slightly different in tesseract. Most of this would work but there may be strange errors. Here is a link to a tutorial for this effect.. If you have questions about this, you can ask :)

else just set a light and a spotlight next to the sun like so:
125rfxw.png

chasester

Offline

#3 2015-12-24 11:34:51

bobsimov
Member

Re: Light Shafts

I tried the Sauerbraten cfg a while ago :P . It needs to use the z-buffer , but i dont know how ... I am currently using a big light source with volumetric effects , but that is killing the FPS . Tesseract shaders are in CubeScript (or ARB ?) , how can i use normal GLSL shaders (.vert / .frag)?

Last edited by bobsimov (2015-12-24 11:35:42)

Offline

#4 2015-12-24 19:35:06

ImNotQ009
Moderator

Re: Light Shafts

bobsimov wrote:

I tried the Sauerbraten cfg a while ago :P . It needs to use the z-buffer , but i dont know how ... I am currently using a big light source with volumetric effects , but that is killing the FPS . Tesseract shaders are in CubeScript (or ARB ?) , how can i use normal GLSL shaders (.vert / .frag)?


The game DOES use GLSL shaders, they're just encapsulated in CubeScript for convenience

Offline

#5 2015-12-25 09:27:01

Lord Kv
Member

Re: Light Shafts

You can only access the final scene color in postfx in Tesseract and Sauerbraten, so the lightshafts need to use bright colors to identify sky. But otherwise the depth information would be used. Also it is common practise to only render lightshafts in 1/2 or 1/4 resolution as the pixel shader is very intensive.

Right now I think the best you can do to get godrays from sun is to use a volumetric spotlight as chasester mentioned.

Offline

#6 2015-12-25 18:36:49

bobsimov
Member

Re: Light Shafts

Apparently :/

Offline

Board footer