Skip to content

Commit

Permalink
Merge pull request #553 from redcamel/dev
Browse files Browse the repository at this point in the history
-
  • Loading branch information
redcamel authored Mar 4, 2019
2 parents f409c54 + dc4226a commit 8f7b18b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 18 deletions.
25 changes: 17 additions & 8 deletions release/RedGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -9397,21 +9397,30 @@ var RedTextMaterial;
// position 계산
mat4 targetMatrix;
if(uOrthographicYn){
targetMatrix = uMMatrix;
targetMatrix = uMMatrix * mat4(
u_width, 0.0, 0.0, 0.0,
0.0, u_height, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
) ;
gl_Position = uPMatrix * uCameraMatrix * targetMatrix * vec4(aVertexPosition, 1.0);


}else{
targetMatrix = uMMatrix * mat4(
u_width/uResolution.y, 0.0, 0.0, 0.0,
0.0, u_height/uResolution.y, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
) ;
//#REDGL_DEFINE#sprite3D#true# gl_Position = uPMatrix * getSprite3DMatrix(uCameraMatrix , targetMatrix) * vec4(aVertexPosition, 1.0);
//#REDGL_DEFINE#sprite3D#true# if(!u_PerspectiveScale){
//#REDGL_DEFINE#sprite3D#true# gl_Position /= gl_Position.w;
//#REDGL_DEFINE#sprite3D#true# gl_Position.xy += aVertexPosition.xy * vec2((uPMatrix * targetMatrix)[0][0],(uPMatrix * targetMatrix)[1][1]);
//#REDGL_DEFINE#sprite3D#true# }
//#REDGL_DEFINE#sprite3D#false# gl_Position = uPMatrix * uCameraMatrix * targetMatrix * vec4(aVertexPosition, 1.0);
}
//#REDGL_DEFINE#sprite3D#true# gl_Position = uPMatrix * getSprite3DMatrix(uCameraMatrix , targetMatrix) * vec4(aVertexPosition, 1.0);
//#REDGL_DEFINE#sprite3D#true# if(!u_PerspectiveScale){
//#REDGL_DEFINE#sprite3D#true# gl_Position /= gl_Position.w;
//#REDGL_DEFINE#sprite3D#true# gl_Position.xy += aVertexPosition.xy * vec2((uPMatrix * targetMatrix)[0][0],(uPMatrix * targetMatrix)[1][1]);
//#REDGL_DEFINE#sprite3D#true# }
//#REDGL_DEFINE#sprite3D#false# gl_Position = uPMatrix * uCameraMatrix * targetMatrix * vec4(aVertexPosition, 1.0);


//#REDGL_DEFINE#directionalShadow#true# vResolution = uResolution;
//#REDGL_DEFINE#directionalShadow#true# vShadowPos = cTexUnitConverter * uDirectionalShadowLightMatrix * targetMatrix * vec4(aVertexPosition, 1.0);
Expand Down Expand Up @@ -24003,4 +24012,4 @@ var RedGLOffScreen;
}
RedWorkerCode = RedWorkerCode.toString().replace(/^function ?. ?\) ?\{|\}\;?$/g, '');
})();
})();var RedGL_VERSION = {version : 'RedGL Release. last update( 2019-02-28 19:57:46)' };console.log(RedGL_VERSION);
})();var RedGL_VERSION = {version : 'RedGL Release. last update( 2019-03-04 09:33:56)' };console.log(RedGL_VERSION);
12 changes: 9 additions & 3 deletions release/RedGL.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 14 additions & 7 deletions src/material/system/RedTextMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,28 @@ var RedTextMaterial;
// position 계산
mat4 targetMatrix;
if(uOrthographicYn){
targetMatrix = uMMatrix;
targetMatrix = uMMatrix * mat4(
u_width, 0.0, 0.0, 0.0,
0.0, u_height, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
) ;
gl_Position = uPMatrix * uCameraMatrix * targetMatrix * vec4(aVertexPosition, 1.0);
}else{
targetMatrix = uMMatrix * mat4(
u_width/uResolution.y, 0.0, 0.0, 0.0,
0.0, u_height/uResolution.y, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
) ;
//#REDGL_DEFINE#sprite3D#true# gl_Position = uPMatrix * getSprite3DMatrix(uCameraMatrix , targetMatrix) * vec4(aVertexPosition, 1.0);
//#REDGL_DEFINE#sprite3D#true# if(!u_PerspectiveScale){
//#REDGL_DEFINE#sprite3D#true# gl_Position /= gl_Position.w;
//#REDGL_DEFINE#sprite3D#true# gl_Position.xy += aVertexPosition.xy * vec2((uPMatrix * targetMatrix)[0][0],(uPMatrix * targetMatrix)[1][1]);
//#REDGL_DEFINE#sprite3D#true# }
//#REDGL_DEFINE#sprite3D#false# gl_Position = uPMatrix * uCameraMatrix * targetMatrix * vec4(aVertexPosition, 1.0);
}
//#REDGL_DEFINE#sprite3D#true# gl_Position = uPMatrix * getSprite3DMatrix(uCameraMatrix , targetMatrix) * vec4(aVertexPosition, 1.0);
//#REDGL_DEFINE#sprite3D#true# if(!u_PerspectiveScale){
//#REDGL_DEFINE#sprite3D#true# gl_Position /= gl_Position.w;
//#REDGL_DEFINE#sprite3D#true# gl_Position.xy += aVertexPosition.xy * vec2((uPMatrix * targetMatrix)[0][0],(uPMatrix * targetMatrix)[1][1]);
//#REDGL_DEFINE#sprite3D#true# }
//#REDGL_DEFINE#sprite3D#false# gl_Position = uPMatrix * uCameraMatrix * targetMatrix * vec4(aVertexPosition, 1.0);
//#REDGL_DEFINE#directionalShadow#true# vResolution = uResolution;
//#REDGL_DEFINE#directionalShadow#true# vShadowPos = cTexUnitConverter * uDirectionalShadowLightMatrix * targetMatrix * vec4(aVertexPosition, 1.0);
Expand Down

0 comments on commit 8f7b18b

Please sign in to comment.