Example #1
0
        void initShaders()
        {
            deformableObjShader           = new DeformablesShader("Shaders/objects.vert", "Shaders/objects.frag");
            deformableObjShader.ShadowMap = shadowMap;

            instancedObjShader           = new InstancedShader("Shaders/objInstanced.vert", "Shaders/objects.frag");
            instancedObjShader.ShadowMap = shadowMap;
            //objShader.DiffuseTexture = heolienneTex;

            shaderSharedData                = new UniformBufferObject <UBOSharedData> (BufferUsageHint.DynamicCopy);
            shaderSharedData.Datas.Color    = new Vector4(0.8f, 0.8f, 0.8f, 1.0f);
            shaderSharedData.Datas.Shared.X = 1.0f;
            shaderSharedData.Datas.SetPass(ShadingPass.Normal);
            shaderSharedData.Bind(0);

            fogData = new UniformBufferObject <UBOFogData> (
                UBOFogData.CreateUBOFogData(), BufferUsageHint.StaticCopy);
            fogData.Bind(1);

            material = new UniformBufferObject <UBOMaterialData> (BufferUsageHint.DynamicCopy);
            material.Bind(2);
        }
Example #2
0
		void initShaders()
		{
			deformableObjShader = new DeformablesShader ("Shaders/objects.vert", "Shaders/objects.frag");
			deformableObjShader.ShadowMap = shadowMap;

			instancedObjShader = new InstancedShader ("Shaders/objInstanced.vert", "Shaders/objects.frag");
			instancedObjShader.ShadowMap = shadowMap;
			//objShader.DiffuseTexture = heolienneTex;

			shaderSharedData = new UniformBufferObject<UBOSharedData> (BufferUsageHint.DynamicCopy);
			shaderSharedData.Datas.Color = new Vector4 (0.8f,0.8f,0.8f,1.0f);
			shaderSharedData.Datas.Shared.X = 1.0f;
			shaderSharedData.Datas.SetPass (ShadingPass.Normal);
			shaderSharedData.Bind (0);

			fogData = new UniformBufferObject<UBOFogData> (
				UBOFogData.CreateUBOFogData (), BufferUsageHint.StaticCopy);
			fogData.Bind (1);

			material = new UniformBufferObject<UBOMaterialData> (BufferUsageHint.DynamicCopy);
			material.Bind (2);
		}