sdfsdfs
This commit is contained in:
79
node_modules/pixi.js/lib/rendering/high-shader/shader-bits/textureBit.js
generated
vendored
Normal file
79
node_modules/pixi.js/lib/rendering/high-shader/shader-bits/textureBit.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
|
||||
"use strict";
|
||||
const textureBit = {
|
||||
name: "texture-bit",
|
||||
vertex: {
|
||||
header: (
|
||||
/* wgsl */
|
||||
`
|
||||
|
||||
struct TextureUniforms {
|
||||
uTextureMatrix:mat3x3<f32>,
|
||||
}
|
||||
|
||||
@group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;
|
||||
`
|
||||
),
|
||||
main: (
|
||||
/* wgsl */
|
||||
`
|
||||
uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;
|
||||
`
|
||||
)
|
||||
},
|
||||
fragment: {
|
||||
header: (
|
||||
/* wgsl */
|
||||
`
|
||||
@group(2) @binding(0) var uTexture: texture_2d<f32>;
|
||||
@group(2) @binding(1) var uSampler: sampler;
|
||||
|
||||
|
||||
`
|
||||
),
|
||||
main: (
|
||||
/* wgsl */
|
||||
`
|
||||
outColor = textureSample(uTexture, uSampler, vUV);
|
||||
`
|
||||
)
|
||||
}
|
||||
};
|
||||
const textureBitGl = {
|
||||
name: "texture-bit",
|
||||
vertex: {
|
||||
header: (
|
||||
/* glsl */
|
||||
`
|
||||
uniform mat3 uTextureMatrix;
|
||||
`
|
||||
),
|
||||
main: (
|
||||
/* glsl */
|
||||
`
|
||||
uv = (uTextureMatrix * vec3(uv, 1.0)).xy;
|
||||
`
|
||||
)
|
||||
},
|
||||
fragment: {
|
||||
header: (
|
||||
/* glsl */
|
||||
`
|
||||
uniform sampler2D uTexture;
|
||||
|
||||
|
||||
`
|
||||
),
|
||||
main: (
|
||||
/* glsl */
|
||||
`
|
||||
outColor = texture(uTexture, vUV);
|
||||
`
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
exports.textureBit = textureBit;
|
||||
exports.textureBitGl = textureBitGl;
|
||||
//# sourceMappingURL=textureBit.js.map
|
Reference in New Issue
Block a user