adjust light functionality,
bugs: - background cannot be changed during runtime
This commit is contained in:
@@ -12,9 +12,9 @@ attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord;
|
||||
attribute vec3 a_normal;
|
||||
|
||||
varying vec2 v_texcoord;
|
||||
varying vec3 v_position;
|
||||
varying vec3 v_normal;
|
||||
varying vec2 v_surfaceUV;
|
||||
varying vec3 v_surfacePosition;
|
||||
varying vec3 v_surfaceNormal;
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -23,7 +23,7 @@ void main()
|
||||
|
||||
// Pass data to fragment shader
|
||||
// Value will be automatically interpolated to fragments inside polygon faces
|
||||
v_texcoord = a_texcoord;
|
||||
v_position = vec3(norm_matrix * m_matrix * a_position);
|
||||
v_normal = a_normal;
|
||||
v_surfaceUV = a_texcoord;
|
||||
v_surfacePosition = vec3(norm_matrix * m_matrix * a_position);
|
||||
v_surfaceNormal = a_normal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user