-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…string-literals fix: shader detection of string literals
- Loading branch information
Showing
9 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18.17.1 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"glsllint.additionalStageAssociations": { | ||
".fragment.fx": "frag", | ||
".vertex.fx": "vert" | ||
}, | ||
"glsllint.glslifyAutoOpenOnError": true, | ||
"glsllint.glslifyOptions": { | ||
// "glsllint.additionalStageAssociations": { | ||
// ".fragment.fx": "frag", | ||
// ".vertex.fx": "vert" | ||
// }, | ||
// "glsllint.glslifyAutoOpenOnError": true, | ||
// "glsllint.glslifyOptions": { | ||
// "basedir": "G:\\src\\vscodeextensions\\vscode-glsllint\\test\\test_shaders\\GLSLIFY\\chunks" | ||
}, | ||
// }, | ||
// "glsllint.glslangValidatorArgs": "--target-env vulkan1.1", | ||
"glsllint.glslifyUseCurrentFileAsBasedir": true, | ||
"glsllint.linkShader": false, | ||
"glsllint.glslangValidatorArgs": "-V", | ||
"glsllint.fallBackStage": "comp" | ||
// "glsllint.glslifyUseCurrentFileAsBasedir": true, | ||
// "glsllint.linkShader": false, | ||
// "glsllint.glslangValidatorArgs": "-V", | ||
// "glsllint.fallBackStage": "comp" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#version 300 es | ||
|
||
precision highp float; | ||
|
||
// input from vertex shader | ||
in vec3 vColor; | ||
out vec4 outPutColor; | ||
|
||
|
||
void main() | ||
{ | ||
outPutColor = vec4(vec3(vColor), 1.0); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#version 300 es | ||
|
||
uniform mat4 u_projectionMatrix; | ||
uniform mat4 u_viewMatrix; | ||
uniform mat4 u_modelMatrix; | ||
|
||
in vec3 a_position; | ||
|
||
out vec4 v_color; | ||
|
||
void main() { | ||
v_color = vec4(1.0, 0.0, 0.0, 1.0); | ||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * vec4( a_position, 1.0 ); | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const vertexShaderSource = `#version 300 es | ||
#pragma vscode_glsllint_stage: vert | ||
void main() | ||
{ | ||
gl_Position = vec4(0.0,0.0,0.0,1.0); | ||
}`; | ||
|
||
const fregmentShderSource = ` | ||
#version 300 es | ||
#pragma vscode_glsllint_stage: frag | ||
main() ERROR HERE FOR TRIGER THE VALIDATOR | ||
{ | ||
gl_FragColor = vec4(1.0,0.0,0.0,1.0); | ||
}`; | ||
|
||
const c = document.querySelector('canvas'); | ||
const gl = c.getContext('webgl2'); | ||
const program = gl.createProgram(); | ||
gl.useProgram(program); |