1
1
import { Shader } from '../../platform/graphics/shader.js' ;
2
- import { ShaderUtils } from '../../platform/graphics/shader-utils.js' ;
2
+ import { ShaderDefinitionUtils } from '../../platform/graphics/shader-definition -utils.js' ;
3
3
import { shaderChunks } from './chunks/chunks.js' ;
4
4
import { getProgramLibrary } from './get-program-library.js' ;
5
5
import { Debug } from '../../core/debug.js' ;
@@ -28,7 +28,7 @@ import { ShaderPass } from '../shader-pass.js';
28
28
* @param {string | string[] } [shaderDefinitionOptions.fragmentOutputTypes] - Fragment shader
29
29
* output types, which default to vec4. Passing a string will set the output type for all color
30
30
* attachments. Passing an array will set the output type for each color attachment.
31
- * @see ShaderUtils .createDefinition
31
+ * @see ShaderDefinitionUtils .createDefinition
32
32
* @returns {Shader } The newly created shader.
33
33
* @category Graphics
34
34
*/
@@ -44,7 +44,7 @@ function createShader(device, vsName, fsName, useTransformFeedback = false, shad
44
44
} ;
45
45
}
46
46
47
- return new Shader ( device , ShaderUtils . createDefinition ( device , {
47
+ return new Shader ( device , ShaderDefinitionUtils . createDefinition ( device , {
48
48
...shaderDefinitionOptions ,
49
49
name : `${ vsName } _${ fsName } ` ,
50
50
vertexCode : shaderChunks [ vsName ] ,
@@ -75,7 +75,7 @@ function createShader(device, vsName, fsName, useTransformFeedback = false, shad
75
75
* @param {string | string[] } [shaderDefinitionOptions.fragmentOutputTypes] - Fragment shader
76
76
* output types, which default to vec4. Passing a string will set the output type for all color
77
77
* attachments. Passing an array will set the output type for each color attachment.
78
- * @see ShaderUtils .createDefinition
78
+ * @see ShaderDefinitionUtils .createDefinition
79
79
* @returns {Shader } The newly created shader.
80
80
* @category Graphics
81
81
*/
@@ -97,7 +97,7 @@ function createShaderFromCode(device, vsCode, fsCode, uniqueName, attributes, us
97
97
const programLibrary = getProgramLibrary ( device ) ;
98
98
let shader = programLibrary . getCachedShader ( uniqueName ) ;
99
99
if ( ! shader ) {
100
- shader = new Shader ( device , ShaderUtils . createDefinition ( device , {
100
+ shader = new Shader ( device , ShaderDefinitionUtils . createDefinition ( device , {
101
101
...shaderDefinitionOptions ,
102
102
name : uniqueName ,
103
103
vertexCode : vsCode ,
0 commit comments