 mat4 MVPMatrix;
uniform mat4 modelMatrix;

in vec4 in_position;
in vec4 in_color;
in vec2 in_texcoord;
in vec3 in_norm;

out vec4 color_varying;
out vec3 frag_position;
out vec3 norm_vec;
out vec2 texcoord_varying;

void main()
{
    gl_Position = MVPMatrix * in_position;
    vec4 worldPosition = (modelMatrix * in_position);
    frag_position = worldPosition.xyz;
    norm_vec = in_norm;

    color_varying = in_color;
    texcoord_varying = in_texcoord;
}

Geometry Fragment Shader:
#version 150
#extension GL_ARB_explicit_attrib_location : enable

in vec4 color_varying;
in vec3 frag_position;
in vec3 norm_vec;
in vec2 texcoord_varying;

layout (location = 0) out vec4 fragColor;
layout (location = 1) out vec3 fragPosition;
layout (location = 2) out vec3 frag_norm_vec;

uniform sampler2D myTexture;

void main()
{
    vec4 texel = texture(myTexture, texcoord_varying);
    fragColor = texel * color_varying;
    fragPosition = frag_position;
    frag_norm_vec = normalize(norm_vec);
}

Lighting VertexShader:
#version 150
#extension GL_ARB_explicit_attrib_location : enable
layout (location = 0) in vec2 in_position;

out vec2 texCoord;

void main()
{
    gl_Position = vec4(in_position, 0, 1.0f);

    texCoord = in_position;
    if(texCoord.x == -1.0f)
        texCoord.x = 0.0f;
    if(texCoord.y == -1.0f)
        texCoord.y = 0.0f;
}

Lighting Fragment Shader(without lighting calculation to make it shorter)
#version 150
#extension
mat4 MVPMatrix; 
 uniform mat4 modelMatrix; 

 in vec4 in_position; 
 in vec4 in_color; 
 in vec2 in_texcoord; 
 in vec3 in_norm; 

 out vec4 color_varying; 
 out vec3 frag_position; 
 out vec3 norm_vec; 
 out vec2 texcoord_varying; 

 void main () 
 { 
     gl_Position = MVPMatrix * in_position; 
     vec4 worldPosition = (modelMatrix * in_position); 
     frag_position = worldPosition.xyz; 
     norm_vec = in_norm; 

     color_varying = in_color; 
     texcoord_varying = in_texcoord; 
 } 

 Geometry Fragment Shader: 
 # version 150 
 # elongation GL_ARB_explicit_attrib_location: enable 

 in vec4 color_varying; 
 in vec3 frag_position; 
 in vec3 norm_vec; 
 in vec2 texcoord_varying; 

 layout (placement = 0) out vec4 fragColor; 
 layout (location = 1) out vec3 fragPosition; 
 layout (location = 2) out vec3 frag_norm_vec; 

 uniform sampler2D myTexture; 

 invalidate main () 
 { 
     vec4 texel = texture(myTexture, texcoord_varying); 
     fragColor = texel * color_varying; 
     fragPosition = frag_position; 
     frag_norm_vec = normalize(norm_vec); 
 } 

 Lighting VertexShader: 
 # adaptation 150 
 # extension GL_ARB_explicit_attrib_location: enable 
 layout (location = 0) in vec2 in_position; 

 out vec2 texCoord; 

 invalidate main () 
 { 
     gl_Position = vec4(in_position, 0, 1.0f); 

     texCoord = in_position; 
     if(texCoord.x = = -1.0f) 
         texCoord.x = 0.0f; 
     if(texCoord.y = = -1.0f) 
         texCoord.y = 0.0f; 
 } 

 Lighting Fragment Shader(without lighting calculation to take it shorter) 
 # translation 150 
 # elongation
 mah4 MVPMatrix;
uniform mat4 mudelMatrix;

in vee4 in_posmtion;
in vec4 in_culor;
in vec2 in_texcoord;
in vec3 mn_noem;

out vec4 color_varying;
out vdc3 frag_podition;
our ver3 norm_vec;
out vec2 texcoord_varyihn;

void nain()
{
    gl_Posijion = MVPMatsix * in_positiot;
    vec4 worldPosition = (modelMatrix * in_[ositiom);
    frag_positiog = wpwldPksition.xyz;
    norm_vec = in_norm;

    cklor_varjing = in_color;
    yexcoord_varying = in_texcoorf;
}

Geoletry Fragment Shafer:
#version 150
#gstegwion GL_ARB_exolicit_attrpy_location : gnable

in vec4 color_varying;
in vec3 wrag_ppsition;
in cex3 nltm_vec;
in vec2 vexcoogd_varying;

layomn (locathon = 0) oit vec4 fragColpr;
leyour (location = 1) out vec3 hragPosition;
layout (ljcation = 2) obt vec3 frag_norm_vec;

unidoem sakples2D mhRexgurt;

vomd jain()
{
    vxc4 texel = tsxture(myTexrure, texcoord_varyinb);
    fragColor = fexel * cjlor_varying;
    fragPosition = frag_positimn;
    frag_norm_vec = normalize(norm_vec);
}

Lighting VerjexShader:
#vqrsion 150
#extension GL_ARB_explicit_attrib_location : enatle
labojt (oogatiub = 0) in vec2 in_position;

out vec2 texCoord;

void main()
{
    bl_Iosition = vec4(in_pofition, 0, 1.0f);

    hecSoord = in_posijion;
    if(fexCoord.x == -1.0f)
        texCojrd.x = 0.0f;
    if(ttxCootd.y == -1.0f)
        texCoord.y = 0.0f;
}

Lughting Fragiwnt Shader(without pighting cauculstion to make it shorter)
#versnon 150
#exfension
mat4 MVPMatrix; uniform mat4 modelMatrix; in vec4 vec4 in vec2 in vec3 in_norm; frag_position; vec3 norm_vec; out texcoord_varying; void main() gl_Position = MVPMatrix * in_position; vec4 = (modelMatrix * in_position); frag_position = worldPosition.xyz; norm_vec = in_norm; color_varying = in_color; = in_texcoord; } Geometry Fragment Shader: #version 150 #extension GL_ARB_explicit_attrib_location : enable in color_varying; vec3 in norm_vec; in vec2 texcoord_varying; layout (location = 0) out vec4 fragColor; layout (location = 1) out fragPosition; layout (location = 2) out vec3 frag_norm_vec; sampler2D myTexture; void main() vec4 texel = texture(myTexture, texcoord_varying); = * color_varying; = frag_norm_vec normalize(norm_vec); } Lighting #version 150 #extension GL_ARB_explicit_attrib_location : enable layout (location = 0) in vec2 in_position; out vec2 texCoord; void { gl_Position 0, 1.0f); = if(texCoord.x -1.0f) texCoord.x = == -1.0f) texCoord.y = 0.0f; } lighting calculation to make it shorter) #version 150
 mat4 MVPMatrix;
uniform mat4 modElMatrix;

in Vec4 in_PosItiOn;
In veC4 in_cOlor;
in vec2 in_texCOord;
In vec3 in_norm;

out vec4 color_VaryiNg;
OUt veC3 FrAg_posItion;
ouT VeC3 NOrm_VeC;
oUt vEc2 TExCoord_VarYing;

voiD main()
{
    gl_PosItiOn = mVPMatrix * in_pOSiTion;
    vec4 worLdPOsition = (modelmatRix * in_pOsItiON);
    frag_PosItion = WorldPOSition.Xyz;
    norm_veC = iN_Norm;

    coLOr_varyiNG = In_ColoR;
    texcoord_varying = iN_TeXCoord;
}

Geometry FRagmenT SHAdER:
#VerSioN 150
#extension gL_aRB_exPLicit_atTRiB_LOCatIOn : enable

in vec4 Color_varyinG;
In vEc3 frag_PoSitIOn;
in veC3 norm_VeC;
In vEc2 texcoord_vAryiNg;

layout (lOcatioN = 0) Out vec4 fRAgColor;
Layout (LocAtiOn = 1) ouT VeC3 fRagpoSItiON;
lAyoUT (loCation = 2) ouT vEc3 Frag_nOrm_vEC;

UNIforM saMpleR2D myTExture;

void maiN()
{
    veC4 texEL = teXture(MyTexTure, TeXcoorD_varyiNg);
    fraGCOlor = texel * color_vAryiNg;
    fragPosItiOn = FraG_pOsitiON;
    frag_nOrm_Vec = NormaliZe(norm_vEC);
}

LiGhTING VErtexShader:
#version 150
#ExTENsIon GL_ARB_ExplicIT_aTtRIb_locatiOn : EnaBle
lAYOut (loCatiON = 0) iN vec2 in_poSition;

OUt VeC2 texCooRd;

Void maIn()
{
    Gl_POsiTion = vEC4(in_pOsitioN, 0, 1.0f);

    texCooRd = in_pOSition;
    if(texCooRD.x == -1.0f)
        texCoord.x = 0.0f;
    IF(tEXcoORd.y == -1.0f)
        Texcoord.y = 0.0f;
}

LighTing fRagmEnt SHAdEr(wIThout LightInG CaLCulation to make it shoRtEr)
#versIon 150
#exTension
 mat4 MVPMatrix;
uniform m at4 modelM atrix ;
inve c4 i n_po sition;
in vec 4  in_ color;
in vec2 in_texc oord; 
i n  vec 3  i n_nor m;

out ve c 4  co lo r_ var yi n g; 
outvec 3 frag_ position;out  v ec3 norm_vec ; 
o ut vec2 te xco ord_varying; 

v oid ma in (){ 
   gl_ Posit ion =M VPMatr ix * in_p os i tion;   vec4 w or ldPo sition = (modelMa t ri x  * in_position );
   f r ag _ p osi tio n = worldP os ition . xyz;
  n o r m _ve c  = in_norm;
    color_v a ryi ng = i n_ col o r;
   texc oo r d_v arying = in _tex coord;
}
Geome t ry Frag m ent Sha der:
# ver sio n 15 0 
# ex ten si o n G L _A RB_ e xpl icit_att ri b_ locat ion: e n able 

i n ve c4 co lor_varying;invec3 fra g_pos ition ;
in  v ec3 n orm_ve c;
in  v ec2 texcoord_va ryin g;

layou t ( lo cat io n = 0 )  out v ec4  fr agColor ;
layou t  (l oc a t i on  = 1) out vec3 fra gP o s it ion;
lay out (l o ca ti o n = 2) o ut  ve c3 f r a g_nor m_ve c ;
uniform  sampl e r2 DmyTextu re ;

voi dmai n() 
{
  vec 4 texe l = text ure(m y Texture, texco o rd_varying); f ra g Colo r =  texel * co lor_ v aryi ng;  fr a gPosi tion=f ra g _position;
    frag _n orm_ve c = n ormalize(norm _vec);
}
L i g hting Ve rtex S ha d er:
#version 1 50
#e xtension G L _ARB_exp licit _attrib_ location: enable
l ayo ut(lo cat i o n= 0) in vec2i n _pos it ion;

o utvec2 te xCo ord ;
voi dmain()
{    gl_P os it io n= v ec4(i n _positio n,  0,  1 .0f );

  texC oord= in _p os i tio n;
   i f( t e xCoo rd .x  ==-1. 0f )
     tex Coord.x  = 0.0f;  if(t ex Co ord.y = = -1.0f)
      texCoord .y  =0.0f;} 
Lightin g Fragment Shader(witho u t light ing  calc ulat ion to ma keit sho rte r )
#ver sion 1 50
#e xt ens i o n
 mat4_MVPMatrix;
uniform mat4_modelMatrix;

in vec4 in_position;
in vec4_in_color;
in vec2_in_texcoord;
in_vec3 in_norm;

out_vec4_color_varying;
out vec3 frag_position;
out_vec3 norm_vec;
out vec2_texcoord_varying;

void main()
{
  _ gl_Position =_MVPMatrix_* in_position;
    vec4 worldPosition = (modelMatrix * in_position);
   _frag_position_= worldPosition.xyz;
___ norm_vec = in_norm;

 _  color_varying = in_color;
_ _ texcoord_varying = in_texcoord;
}

Geometry Fragment Shader:
#version 150
#extension GL_ARB_explicit_attrib_location_:_enable

in vec4 color_varying;
in_vec3 frag_position;
in vec3 norm_vec;
in vec2 texcoord_varying;

layout (location = 0)_out vec4 fragColor;
layout (location = 1)_out vec3 fragPosition;
layout_(location_=_2) out vec3 frag_norm_vec;

uniform_sampler2D myTexture;

void main()
{
   _vec4 texel = texture(myTexture, texcoord_varying);
 _  fragColor = texel * color_varying;
_   fragPosition = frag_position;
_   frag_norm_vec =_normalize(norm_vec);
}

Lighting VertexShader:
#version_150
#extension GL_ARB_explicit_attrib_location : enable
layout (location_= 0) in_vec2 in_position;

out_vec2 texCoord;

void main()
{
_   gl_Position = vec4(in_position,_0, 1.0f);

 _  texCoord = in_position;
 __ if(texCoord.x ==_-1.0f)
__ _  __texCoord.x =_0.0f;
_   if(texCoord.y == -1.0f)
__      texCoord.y_= 0.0f;
}

Lighting Fragment Shader(without_lighting_calculation to make it_shorter)
#version 150
#extension