DGL
https://delphigl.com/forum/

Flat Sky
https://delphigl.com/forum/viewtopic.php?f=19&t=3962
Seite 1 von 1

Autor:  Stucuk [ Do Mär 24, 2005 03:56 ]
Betreff des Beitrags:  Flat Sky

In rtcw they use flat sky. The problem im having is making the world draw ontop of the sky.

Basicaly id like it as if the depthfunc was set to gl_always, but without the problems that parts of the level would be wrongly drawn ontop of its self.

Autor:  Flash [ Do Mär 24, 2005 11:11 ]
Betreff des Beitrags: 

Wouldn't it be easyer to clear the depthbuffer :?: So you can use the normal depthtest for the rest of the scene.

Autor:  LarsMiddendorf [ Do Mär 24, 2005 11:29 ]
Betreff des Beitrags: 

The sky ist perhaps not drawn as a real plane but the sky faces are rendered with a projected texture.

Autor:  Stucuk [ Do Mär 24, 2005 15:56 ]
Betreff des Beitrags: 

Code:
  1. If SkyBoxRequired then
  2.   begin
  3. //  glDepthMask(False);
  4. //  glDepthFunc(GL_NEVER);
  5.   glDisable(GL_DEPTH_TEST);
  6.   glClearDepth(1);
  7.   RenderSkybox;
  8.   glEnable(GL_DEPTH_TEST);
  9.  // glDepthFunc(GL_LESS);
  10. //  SwapBuffers(Engine.OpenGLVars.h_DC);
  11. //  glDepthMask(True);
  12.   end;


Clearing the buffer isn't doing anything. Doesn't seem to want to draw ontop of it....

In a few maps they have skyportals, basicaly a 3d cordinate which takes u to a mini landscape, from what i can tell thats drawn then the rest of the world is drawn ontop, so that when u move around u can see the landscape. A pic of the one in Escape1.Bsp is shown below (if u look at pic 2, then pic 4 ull notice the size of the features are nearly the same, leading me to believe that it is drawn first then the rest drawn ontop)

Dateianhänge:
skyportal.jpg [239.46 KiB]
27-mal heruntergeladen

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/