mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Initial commit of ResInsight version 0.4.8
This commit is contained in:
33
VisualizationModules/LibRender/glsl/vs_Standard.glsl
Normal file
33
VisualizationModules/LibRender/glsl/vs_Standard.glsl
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
uniform mat4 cvfu_modelViewProjectionMatrix;
|
||||
uniform mat4 cvfu_modelViewMatrix;
|
||||
uniform mat3 cvfu_normalMatrix;
|
||||
|
||||
attribute vec4 cvfa_vertex;
|
||||
attribute vec3 cvfa_normal;
|
||||
attribute vec2 cvfa_texCoord;
|
||||
|
||||
varying vec3 v_ecPosition;
|
||||
varying vec3 v_ecNormal;
|
||||
varying vec2 v_texCoord;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Vertex Shader - Standard
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void main ()
|
||||
{
|
||||
#ifdef CVF_CALC_SHADOW_COORD_IMPL
|
||||
calcShadowCoord();
|
||||
#endif
|
||||
|
||||
// Transforms vertex position and normal vector to eye space
|
||||
v_ecPosition = (cvfu_modelViewMatrix * cvfa_vertex).xyz;
|
||||
v_ecNormal = cvfu_normalMatrix * cvfa_normal;
|
||||
v_texCoord = cvfa_texCoord;
|
||||
|
||||
#ifdef CVF_CALC_CLIP_DISTANCES_IMPL
|
||||
calcClipDistances(vec4(v_ecPosition, 1));
|
||||
#endif
|
||||
|
||||
gl_Position = cvfu_modelViewProjectionMatrix*cvfa_vertex;
|
||||
}
|
||||
Reference in New Issue
Block a user