本文整理汇总了C#中Shader.insertUniform方法的典型用法代码示例。如果您正苦于以下问题:C# Shader.insertUniform方法的具体用法?C# Shader.insertUniform怎么用?C# Shader.insertUniform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shader
的用法示例。
在下文中一共展示了Shader.insertUniform方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setupMatrices
protected override void setupMatrices(ref ViewInfo curView, ref Shader shader, ref Mesh curMesh)
{
base.setupMatrices(ref curView, ref shader, ref curMesh);
shader.insertUniform(Shader.Uniform.rotation_matrix2, ref orientation2);
shader.insertUniform(Shader.Uniform.model_matrix2, ref modelMatrix2);
}
示例2: activate
public override void activate(Shader shader, Drawable drawble)
{
GL.Uniform3(shader.sunDirection, ref pointingDirection);
GL.Uniform3(shader.sunColor, ref colorRgb);
shader.insertUniform(Shader.Uniform.in_lightambient, ref lightAmbient);
GL.UniformMatrix4(shader.sunMatrix, false, ref shadowMatrix);
GL.UniformMatrix4(shader.sunInnerMatrix, false, ref innerShadowMatrix);
}
示例3: draw
/*
public void draw(Shader curShader, int[] curtexture, Shader.Uniform uniform, Vector2 vector2)
{
draw(curShader, curtexture,new UniformPairList( Shader.Uniform.in_vector, Vector2.Zero));
}
*/
public void draw(Shader shader, int[] curtexture, Shader.Uniform uniform, object obj)
{
gameWindow.checkGlError("--uncaught ERROR drawing 2d Quad--" + shader.name);
GL.UseProgram(shader.handle);
//unis.insert(ref shader);
shader.insertGenUniform(uniform, obj);
shader.insertUniform(Shader.Uniform.in_screensize, ref gameWindow.virtual_size);
shader.insertUniform(Shader.Uniform.in_rendersize, ref gameWindow.currentSize);
shader.insertUniform(Shader.Uniform.in_time, ref gameWindow.frameTime);
//shader.insertUniform(Shader.Uniform.in_near, ref );
//shader.insertUniform(Shader.Uniform.in_far, ref gameWindow.currentSize);
if (Scene != null)
{
shader.insertUniform(Shader.Uniform.in_no_lights, ref Scene.lightCount);
shader.insertUniform(Shader.Uniform.curLight, ref Scene.currentLight);
shader.insertUniform(Shader.Uniform.in_eyepos, ref Scene.eyePos);
}
initTextures(curtexture, shader.handle, "Texture");
GL.BindVertexArray(vaoHandle[0]);
GL.DrawElements(BeginMode.Triangles, meshes[0].indicesVboData.Length, DrawElementsType.UnsignedInt, IntPtr.Zero);
gameWindow.checkGlError("--Drawing ERROR Quad--" + shader.name);
}
示例4: activateDeffered
public override void activateDeffered(Shader shader)
{
shader.insertUniform(Shader.Uniform.defDirection ,ref pointingDirection);
shader.insertUniform(Shader.Uniform.defColor, ref colorRgb);
shader.insertUniform(Shader.Uniform.in_lightambient, ref lightAmbient);
shader.insertUniform(Shader.Uniform.defMatrix ,ref shadowMatrix);
shader.insertUniform(Shader.Uniform.defInnerMatrix, ref innerShadowMatrix);
shader.insertUniform(Shader.Uniform.shadowQuality, ref shadowQuality);
}
示例5: setSpecialUniforms
protected override void setSpecialUniforms(ref Shader shader, ref Mesh curMesh)
{
shader.insertUniform(Shader.Uniform.in_mod, ref state);
}
示例6: setupMatrices
protected virtual void setupMatrices(ref ViewInfo curView,ref Shader shader, ref Mesh curMesh)
{
shader.insertUniform(Shader.Uniform.projection_matrix, ref curView.projectionMatrix);
shader.insertUniform(Shader.Uniform.modelview_matrix, ref curView.modelviewMatrix);
shader.insertUniform(Shader.Uniform.rotation_matrix, ref orientation);
shader.insertUniform(Shader.Uniform.model_matrix, ref modelMatrix);
}
示例7: setSpecialUniforms
protected override void setSpecialUniforms(ref Shader shader, ref Mesh curMesh)
{
Vector3 sunColor = Scene.sunLight.Color.Xyz; ;
shader.insertUniform(Shader.Uniform.in_lightsun, ref sunColor);
}