void testDynShaders() { DynamicShader ds = new DynamicShader() { floatPrecision = DynamicShader.Precision.highp }; ds.VertexAttributes.Add(new ShaderData(typeof(Vector3), "in_position")); ShaderData <Matrix4> sdProjection = new ShaderData <Matrix4> ("projection"); ShaderData <Matrix4> sdModelView = new ShaderData <Matrix4> ("modelView"); ShaderData <Matrix4> sdModel = new ShaderData <Matrix4> ("model"); ds.Uniforms.Add(sdProjection); ds.Uniforms.Add(sdModelView); ds.Uniforms.Add(sdModel); ds.Uniforms.Add(new ShaderData <Vector4>("lightPos")); ds.Uniforms.Add(new ShaderData <float>("heightScale")); ds.Uniforms.Add(new ShaderData <Vector2>("mapSize")); ds.Compile(); }
void testDynShaders() { DynamicShader ds = new DynamicShader() { floatPrecision = DynamicShader.Precision.highp }; ds.VertexAttributes.Add(new ShaderData(typeof(Vector3), "in_position")); ShaderData<Matrix4> sdProjection = new ShaderData<Matrix4> ("projection"); ShaderData<Matrix4> sdModelView = new ShaderData<Matrix4> ("modelView"); ShaderData<Matrix4> sdModel = new ShaderData<Matrix4> ("model"); ds.Uniforms.Add (sdProjection); ds.Uniforms.Add (sdModelView); ds.Uniforms.Add (sdModel); ds.Uniforms.Add(new ShaderData<Vector4>("lightPos")); ds.Uniforms.Add(new ShaderData<float>("heightScale")); ds.Uniforms.Add(new ShaderData<Vector2>("mapSize")); ds.Compile (); }