This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
uniform sampler2D uSampler; | |
void main(void) { | |
gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
uniform sampler2D uSampler; | |
void main(void) { | |
gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
varying vec3 vLightWeighting; | |
uniform float uAlpha; | |
uniform sampler2D uSampler; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
uniform sampler2D uSampler; | |
uniform vec3 uColor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
uniform sampler2D uSampler; | |
void main(void) { | |
gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
varying vec3 vLightWeighting; | |
uniform sampler2D uSampler; | |
void main(void) { | |
vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec2 vTextureCoord; | |
varying vec3 vLightWeighting; | |
uniform sampler2D uSampler; | |
void main(void) { | |
vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Learning WebGL for Plask Lesson13 | |
//Learing WebGL : http://learningwebgl.com/blog/?page_id=1217 | |
//Github : https://github.com/gpjt/webgl-lessons (this script use 'moon.gif' & 'crate.gif'.) | |
//zoom : qe, | |
//lighting : v, | |
//useFragmentLighting : f | |
//useTexture : c, | |
//reset : r を割り当ててます。 | |
//plaskで入力エリアを作る方法が無さげなのでtgyhujに平行光の色だけ割り当ててます。 | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Mat3 for Plask | |
//Add your plask.js | |
////////Change your plask.js makeSetter and add exports.Mat3////////////// | |
function makeSetter(type, loc) { | |
switch (type) { | |
case gl.BOOL: // NOTE: bool could be set with 1i or 1f. | |
case gl.INT: | |
case gl.SAMPLER_2D: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Learning WebGL for Plask Lesson14 | |
//Learing WebGL : http://learningwebgl.com/blog/?page_id=1217 | |
//Github : https://github.com/gpjt/webgl-lessons (this script use 'earth.jpg' , 'arroway.de_metal+structure+06_d100_flat.jpg' and 'Teapot.json') | |
//zoom : qe, | |
//lighting : v, | |
//useFragmentLighting : f | |
//useTexture : c, | |
//reset : r, | |
//specularColor : tgyhuj, | |
// |