]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - dpsoftrast.h
use dynamic eye position-centered bouncegrid when rendering in dynamic
[xonotic/darkplaces.git] / dpsoftrast.h
index f5db67b1c19b947c7fb4b3ffd17c0bd67002636e..016d21116956025e42af7506fd877f22064c03a5 100644 (file)
@@ -31,9 +31,10 @@ typedef enum DPSOFTRAST_TEXTURE_FILTER_e
 }
 DPSOFTRAST_TEXTURE_FILTER;
 
-void DPSOFTRAST_Init(int width, int height, int numthreads, unsigned int *colorpixels, unsigned int *depthpixels);
+int DPSOFTRAST_Init(int width, int height, int numthreads, int interlace, unsigned int *colorpixels, unsigned int *depthpixels);
 void DPSOFTRAST_Shutdown(void);
 void DPSOFTRAST_Flush(void);
+void DPSOFTRAST_Finish(void);
 
 int DPSOFTRAST_Texture_New(int flags, int width, int height, int depth);
 void DPSOFTRAST_Texture_Free(int index);
@@ -122,6 +123,21 @@ typedef enum gl20_texunit_e
 }
 gl20_texunit;
 
+typedef enum glsl_attrib_e
+{
+       GLSLATTRIB_POSITION = 0,
+       GLSLATTRIB_COLOR = 1,
+       GLSLATTRIB_TEXCOORD0 = 2,
+       GLSLATTRIB_TEXCOORD1 = 3,
+       GLSLATTRIB_TEXCOORD2 = 4,
+       GLSLATTRIB_TEXCOORD3 = 5,
+       GLSLATTRIB_TEXCOORD4 = 6,
+       GLSLATTRIB_TEXCOORD5 = 7,
+       GLSLATTRIB_TEXCOORD6 = 8,
+       GLSLATTRIB_TEXCOORD7 = 9,
+}
+glsl_attrib;
+
 // this enum selects which of the glslshadermodeinfo entries should be used
 typedef enum shadermode_e
 {
@@ -141,6 +157,7 @@ typedef enum shadermode_e
        SHADERMODE_SHOWDEPTH, ///< (debugging) renders depth as color
        SHADERMODE_DEFERREDGEOMETRY, ///< (deferred) render material properties to screenspace geometry buffers
        SHADERMODE_DEFERREDLIGHTSOURCE, ///< (deferred) use directional pixel shading from light source (rtlight) on screenspace geometry buffers
+       SHADERMODE_DEFERREDBOUNCELIGHT, ///< (deferred) simple area light deferred particles using geometry buffers for Global Illumination purposes
        SHADERMODE_COUNT
 }
 shadermode_t;
@@ -169,13 +186,14 @@ typedef enum shaderpermutation_e
        SHADERPERMUTATION_SHADOWMAPPCF2 = 1<<19, ///< (lightsource) use higher quality percentage closer filtering on shadowmap test results
        SHADERPERMUTATION_SHADOWSAMPLER = 1<<20, ///< (lightsource) use hardware shadowmap test
        SHADERPERMUTATION_SHADOWMAPVSDCT = 1<<21, ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
-       SHADERPERMUTATION_SHADOWMAPORTHO = 1<<22, //< (lightsource) use orthographic shadowmap projection
+       SHADERPERMUTATION_SHADOWMAPORTHO = 1<<22, ///< (lightsource) use orthographic shadowmap projection
        SHADERPERMUTATION_DEFERREDLIGHTMAP = 1<<23, ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
        SHADERPERMUTATION_ALPHAKILL = 1<<24, ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5
        SHADERPERMUTATION_REFLECTCUBE = 1<<25, ///< fake reflections using global cubemap (not HDRI light probe)
-       SHADERPERMUTATION_NORMALMAPSCROLLBLEND = 1<<26, // (water) counter-direction normalmaps scrolling
-       SHADERPERMUTATION_LIMIT = 1<<27, ///< size of permutations array
-       SHADERPERMUTATION_COUNT = 27 ///< size of shaderpermutationinfo array
+       SHADERPERMUTATION_NORMALMAPSCROLLBLEND = 1<<26, ///< (water) counter-direction normalmaps scrolling
+       SHADERPERMUTATION_BOUNCEGRID = 1<<27, ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
+       SHADERPERMUTATION_LIMIT = 1<<28, ///< size of permutations array
+       SHADERPERMUTATION_COUNT = 28 ///< size of shaderpermutationinfo array
 }
 shaderpermutation_t;