|
@@ -174,14 +174,18 @@ class ModelLibShader extends hxsl.Shader {
|
|
}
|
|
}
|
|
|
|
|
|
function __init__vertex() {
|
|
function __init__vertex() {
|
|
- calculatedUV = clamp(input2.uv.fract(), libraryParams.y, 1.0 - libraryParams.y);
|
|
|
|
- calculatedUV = calculatedUV * uvTransform.zw + uvTransform.xy;
|
|
|
|
|
|
+ calculatedUV = input2.uv;
|
|
previousTransformedPosition = transformedPosition;
|
|
previousTransformedPosition = transformedPosition;
|
|
if( hasNormal )
|
|
if( hasNormal )
|
|
transformedTangent = vec4(input2.tangent * global.modelView.mat3(),input2.tangent.dot(input2.tangent) > 0.5 ? 1. : -1.);
|
|
transformedTangent = vec4(input2.tangent * global.modelView.mat3(),input2.tangent.dot(input2.tangent) > 0.5 ? 1. : -1.);
|
|
mipLevel = pow(saturate((projectedPosition.z - mipStart) / (mipEnd - mipStart)), mipPower) * mipNumber;
|
|
mipLevel = pow(saturate((projectedPosition.z - mipStart) / (mipEnd - mipStart)), mipPower) * mipNumber;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function fragment() {
|
|
|
|
+ calculatedUV = clamp(calculatedUV.fract(), libraryParams.y, 1.0 - libraryParams.y);
|
|
|
|
+ calculatedUV = calculatedUV * uvTransform.zw + uvTransform.xy;
|
|
|
|
+ }
|
|
|
|
+
|
|
function __init__fragment() {
|
|
function __init__fragment() {
|
|
pixelColor = singleTexture ? texture.getLod(calculatedUV, 0.0) : textures.getLod(vec3(calculatedUV, libraryParams.x), 0.0);
|
|
pixelColor = singleTexture ? texture.getLod(calculatedUV, 0.0) : textures.getLod(vec3(calculatedUV, libraryParams.x), 0.0);
|
|
if( hasNormal ) {
|
|
if( hasNormal ) {
|