void initShaders() { circleShader = new CircleShader("GGL.Shaders.GameLib.red", _circleTexSize, _circleTexSize); circleShader.Color = Color.White; circleShader.Radius = 0.01f; gridShader = new GameLib.VertexDispShader("Ottd3D.Shaders.VertDisp.vert", "Ottd3D.Shaders.Grid.frag"); simpleTexturedShader = new GameLib.Shader(); CacheRenderingShader = new go.GLBackend.TexturedShader(); circleShader.Update(); Texture.FlipY = false; Texture.DefaultMagFilter = TextureMagFilter.Nearest; Texture.DefaultMinFilter = TextureMinFilter.Nearest; gridShader.DisplacementMap = Texture.Load("heightmap.png"); gridShader.LightPos = vLight; gridShader.MapSize = new Vector2(_gridSize, _gridSize); gridShader.HeightScale = heightScale; gridShader.SplatTexture = Texture.Load("splat.png"); Texture.DefaultMagFilter = TextureMagFilter.Linear; Texture.DefaultMinFilter = TextureMinFilter.Linear; Texture.FlipY = true; objShader = new SingleLightShader(); objShader.Color = Color.White; objShader.LightPos = vLight; objShader.DiffuseTexture = heolienneTex; objShader.DisplacementMap = gridShader.DisplacementMap; objShader.MapSize = new Vector2(_gridSize, _gridSize); objShader.HeightScale = heightScale; }
void initShaders() { circleShader = new CircleShader ("GGL.Shaders.GameLib.red",_circleTexSize, _circleTexSize); circleShader.Color = Color.White; circleShader.Radius = 0.01f; gridShader = new GameLib.VertexDispShader ("Ottd3D.Shaders.VertDisp.vert", "Ottd3D.Shaders.Grid.frag"); simpleTexturedShader = new GameLib.Shader (); CacheRenderingShader = new go.GLBackend.TexturedShader(); circleShader.Update (); Texture.FlipY = false; Texture.DefaultMagFilter = TextureMagFilter.Nearest; Texture.DefaultMinFilter = TextureMinFilter.Nearest; gridShader.DisplacementMap = Texture.Load ("heightmap.png"); gridShader.LightPos = vLight; gridShader.MapSize = new Vector2 (_gridSize, _gridSize); gridShader.HeightScale = heightScale; gridShader.SplatTexture = Texture.Load ("splat.png"); Texture.DefaultMagFilter = TextureMagFilter.Linear; Texture.DefaultMinFilter = TextureMinFilter.Linear; Texture.FlipY = true; objShader = new SingleLightShader (); objShader.Color = Color.White; objShader.LightPos = vLight; objShader.DiffuseTexture = heolienneTex; objShader.DisplacementMap = gridShader.DisplacementMap; objShader.MapSize = new Vector2 (_gridSize, _gridSize); objShader.HeightScale = heightScale; }