|
@@ -545,10 +545,13 @@ ${ flowData.code }
|
|
|
* @param {string} textureProperty - The name of the texture uniform in the shader.
|
|
* @param {string} textureProperty - The name of the texture uniform in the shader.
|
|
|
* @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
|
|
* @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
|
|
|
* @param {string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture.
|
|
* @param {string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture.
|
|
|
|
|
+ * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample.
|
|
|
* @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.
|
|
* @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.
|
|
|
* @return {string} The GLSL snippet.
|
|
* @return {string} The GLSL snippet.
|
|
|
*/
|
|
*/
|
|
|
- generateTextureLevel( texture, textureProperty, uvSnippet, levelSnippet, offsetSnippet ) {
|
|
|
|
|
|
|
+ generateTextureLevel( texture, textureProperty, uvSnippet, levelSnippet, depthSnippet, offsetSnippet ) {
|
|
|
|
|
+
|
|
|
|
|
+ if ( depthSnippet ) uvSnippet = `vec3( ${ uvSnippet }, ${ depthSnippet } )`;
|
|
|
|
|
|
|
|
if ( offsetSnippet ) {
|
|
if ( offsetSnippet ) {
|
|
|
|
|
|
|
@@ -567,10 +570,13 @@ ${ flowData.code }
|
|
|
* @param {string} textureProperty - The name of the texture uniform in the shader.
|
|
* @param {string} textureProperty - The name of the texture uniform in the shader.
|
|
|
* @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
|
|
* @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
|
|
|
* @param {string} biasSnippet - A GLSL snippet that represents the bias to apply to the mip level before sampling.
|
|
* @param {string} biasSnippet - A GLSL snippet that represents the bias to apply to the mip level before sampling.
|
|
|
|
|
+ * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample.
|
|
|
* @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.
|
|
* @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.
|
|
|
* @return {string} The GLSL snippet.
|
|
* @return {string} The GLSL snippet.
|
|
|
*/
|
|
*/
|
|
|
- generateTextureBias( texture, textureProperty, uvSnippet, biasSnippet, offsetSnippet ) {
|
|
|
|
|
|
|
+ generateTextureBias( texture, textureProperty, uvSnippet, biasSnippet, depthSnippet, offsetSnippet ) {
|
|
|
|
|
+
|
|
|
|
|
+ if ( depthSnippet ) uvSnippet = `vec3( ${ uvSnippet }, ${ depthSnippet } )`;
|
|
|
|
|
|
|
|
if ( offsetSnippet ) {
|
|
if ( offsetSnippet ) {
|
|
|
|
|
|
|
@@ -589,10 +595,13 @@ ${ flowData.code }
|
|
|
* @param {string} textureProperty - The name of the texture uniform in the shader.
|
|
* @param {string} textureProperty - The name of the texture uniform in the shader.
|
|
|
* @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
|
|
* @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
|
|
|
* @param {Array<string>} gradSnippet - An array holding both gradient GLSL snippets.
|
|
* @param {Array<string>} gradSnippet - An array holding both gradient GLSL snippets.
|
|
|
|
|
+ * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample.
|
|
|
* @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.
|
|
* @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture.
|
|
|
* @return {string} The GLSL snippet.
|
|
* @return {string} The GLSL snippet.
|
|
|
*/
|
|
*/
|
|
|
- generateTextureGrad( texture, textureProperty, uvSnippet, gradSnippet, offsetSnippet ) {
|
|
|
|
|
|
|
+ generateTextureGrad( texture, textureProperty, uvSnippet, gradSnippet, depthSnippet, offsetSnippet ) {
|
|
|
|
|
+
|
|
|
|
|
+ if ( depthSnippet ) uvSnippet = `vec3( ${ uvSnippet }, ${ depthSnippet } )`;
|
|
|
|
|
|
|
|
if ( offsetSnippet ) {
|
|
if ( offsetSnippet ) {
|
|
|
|
|
|