getTexture method
dynamic
getTexture(
- dynamic textureProperty,
- dynamic uvSnippet, [
- dynamic biasSnippet,
- dynamic shaderStage,
override
Implementation
@override
getTexture(textureProperty, uvSnippet, [biasSnippet, shaderStage]) {
shaderStage ??= this.shaderStage;
if (shaderStage == 'fragment') {
return """textureSample( ${textureProperty}, ${textureProperty}_sampler, ${uvSnippet} )""";
} else {
this._include('repeatWrapping');
var dimension = """textureDimensions( ${textureProperty}, 0 )""";
return """textureLoad( ${textureProperty}, repeatWrapping( ${uvSnippet}, ${dimension} ), 0 )""";
}
}