Skip to content

Commit e73c718

Browse files
committed
add IS_VERTEX and IS_FRAGMENT to shader defines
mrdoob#10750 Allows for adding stuff to commons chunk for example.
1 parent 7dbc867 commit e73c718

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/renderers/webgl/WebGLProgram.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ function WebGLProgram( renderer, code, material, parameters ) {
310310
} else {
311311

312312
prefixVertex = [
313+
'#define IS_VERTEX',
313314

314315
'precision ' + parameters.precision + ' float;',
315316
'precision ' + parameters.precision + ' int;',
@@ -418,6 +419,8 @@ function WebGLProgram( renderer, code, material, parameters ) {
418419

419420
customExtensions,
420421

422+
'#define IS_FRAGMENT',
423+
421424
'precision ' + parameters.precision + ' float;',
422425
'precision ' + parameters.precision + ' int;',
423426

0 commit comments

Comments
 (0)