Skip to content

Commit

Permalink
add IS_VERTEX and IS_FRAGMENT to shader defines
Browse files Browse the repository at this point in the history
mrdoob#10750

Allows for adding stuff to commons chunk for example.
  • Loading branch information
pailhead committed Mar 23, 2017
1 parent 7dbc867 commit e73c718
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderers/webgl/WebGLProgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ function WebGLProgram( renderer, code, material, parameters ) {
} else {

prefixVertex = [
'#define IS_VERTEX',

'precision ' + parameters.precision + ' float;',
'precision ' + parameters.precision + ' int;',
Expand Down Expand Up @@ -418,6 +419,8 @@ function WebGLProgram( renderer, code, material, parameters ) {

customExtensions,

'#define IS_FRAGMENT',

'precision ' + parameters.precision + ' float;',
'precision ' + parameters.precision + ' int;',

Expand Down

0 comments on commit e73c718

Please sign in to comment.