@rings-webgpu/core 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rings.es.js +201 -197
- package/dist/rings.es.js.map +2 -2
- package/dist/rings.es.max.js +186 -179
- package/dist/rings.umd.js +197 -193
- package/dist/rings.umd.js.map +2 -2
- package/dist/rings.umd.max.js +186 -179
- package/dist/types/assets/shader/materials/program/ShadowMapping_frag.d.ts +3 -0
- package/package.json +1 -1
package/dist/rings.umd.max.js
CHANGED
|
@@ -5811,202 +5811,219 @@ var<uniform> materialUniform: MaterialUniform;
|
|
|
5811
5811
|
}
|
|
5812
5812
|
`;
|
|
5813
5813
|
|
|
5814
|
-
let ShadowMapping_frag =
|
|
5815
|
-
|
|
5814
|
+
let ShadowMapping_frag = (
|
|
5815
|
+
/*wgsl*/
|
|
5816
|
+
`
|
|
5817
|
+
@group(1) @binding(auto) var shadowMapSampler: sampler_comparison;
|
|
5816
5818
|
@group(1) @binding(auto) var shadowMap: texture_depth_2d_array;
|
|
5817
|
-
@group(1) @binding(auto) var pointShadowMapSampler:
|
|
5819
|
+
@group(1) @binding(auto) var pointShadowMapSampler: sampler_comparison;
|
|
5818
5820
|
@group(1) @binding(auto) var pointShadowMap: texture_depth_cube_array;
|
|
5819
5821
|
|
|
5820
5822
|
var<private> directShadowVisibility: array<f32, 8>;
|
|
5821
5823
|
var<private> pointShadows: array<f32, 8>;
|
|
5822
|
-
var<private> shadowWeight: f32 = 1.0;
|
|
5824
|
+
var<private> shadowWeight: f32 = 1.0 ;
|
|
5823
5825
|
|
|
5824
5826
|
fn useShadow(){
|
|
5825
|
-
directShadowVisibility = array<f32, 8>(1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0);
|
|
5827
|
+
directShadowVisibility = array<f32, 8>( 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0) ;
|
|
5826
5828
|
pointShadows = array<f32, 8>(1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0) ;
|
|
5827
5829
|
directShadowMaping(globalUniform.shadowBias);
|
|
5828
5830
|
pointShadowMapCompare(globalUniform.pointShadowBias);
|
|
5829
5831
|
}
|
|
5830
5832
|
|
|
5831
5833
|
fn calcBasicBias(shadowWorldSize:f32, shadowDepthTexSize:f32, near:f32, far:f32) -> f32{
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5834
|
+
var bias = shadowWorldSize / shadowDepthTexSize;
|
|
5835
|
+
bias = bias / (far - near);
|
|
5836
|
+
return bias * 2.0;
|
|
5835
5837
|
}
|
|
5836
5838
|
|
|
5837
|
-
const dirCount:i32 = 8;
|
|
5838
|
-
const pointCount:i32 = 8;
|
|
5839
|
-
const csmCount:i32 = ${CSM.Cascades};
|
|
5839
|
+
const dirCount:i32 = 8 ;
|
|
5840
|
+
const pointCount:i32 = 8 ;
|
|
5841
|
+
const csmCount:i32 = ${CSM.Cascades} ;
|
|
5840
5842
|
var<private> csmLevel:i32 = -1;
|
|
5843
|
+
fn directShadowMaping(shadowBias: f32) {
|
|
5841
5844
|
|
|
5842
|
-
fn directShadowMaping(shadowBias: f32) {
|
|
5843
5845
|
let enableCSM:bool = globalUniform.enableCSM > 0.5;
|
|
5844
|
-
for(var i:i32 = 0; i < dirCount; i = i+1){
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
if(validCount >= 2 || totalWeight >= 0.99){
|
|
5878
|
-
csmLevel = csm;
|
|
5879
|
-
break;
|
|
5880
|
-
};
|
|
5881
|
-
}
|
|
5882
|
-
}
|
|
5883
|
-
|
|
5884
|
-
totalWeight += 0.0001;
|
|
5885
|
-
if(validCount == 0){
|
|
5886
|
-
visibility = 1.0;
|
|
5887
|
-
}else{
|
|
5888
|
-
visibility = visibility / totalWeight ;
|
|
5889
|
-
};
|
|
5890
|
-
} else {
|
|
5891
|
-
shadowMatrix = globalUniform.shadowMatrix[shadowIndex];
|
|
5892
|
-
if(enableCSM) {
|
|
5893
|
-
shadowIndex += csmCount - 1;
|
|
5894
|
-
}
|
|
5895
|
-
visibility = directShadowMapingIndex(light, shadowMatrix, shadowIndex, shadowBias).x;
|
|
5846
|
+
for (var i: i32 = 0; i < dirCount ; i = i + 1) {
|
|
5847
|
+
if( i >= globalUniform.nDirShadowStart && i < globalUniform.nDirShadowEnd ){
|
|
5848
|
+
let ldx = globalUniform.shadowLights[u32(i) / 4u][u32(i) % 4u];
|
|
5849
|
+
let light = lightBuffer[u32(ldx)] ;
|
|
5850
|
+
var shadowIndex = i32(light.castShadow);
|
|
5851
|
+
var visibility = 1.0;
|
|
5852
|
+
var shadowMatrix:mat4x4<f32>;
|
|
5853
|
+
#if USE_CSM
|
|
5854
|
+
if(enableCSM && shadowIndex == 0){
|
|
5855
|
+
var totalWeight = 0.0;
|
|
5856
|
+
visibility = 0.0;
|
|
5857
|
+
var validCount = 0;
|
|
5858
|
+
for(var csm:i32 = 0; csm < csmCount; csm ++){
|
|
5859
|
+
var csmShadowBias = globalUniform.csmShadowBias[csm] * shadowBias;
|
|
5860
|
+
shadowMatrix = globalUniform.csmMatrix[csm];
|
|
5861
|
+
let csmShadowResult = directShadowMapingIndex(light, shadowMatrix, csm, csmShadowBias);
|
|
5862
|
+
if(csmShadowResult.y < 0.5){
|
|
5863
|
+
validCount ++;
|
|
5864
|
+
|
|
5865
|
+
var uv = 2.0 * csmShadowResult.zw - vec2<f32>(1.0);
|
|
5866
|
+
uv = saturate(vec2<f32>(1.0) - abs(uv));
|
|
5867
|
+
uv /= clamp(globalUniform.csmMargin, 0.01, 0.5);
|
|
5868
|
+
var weight:f32 = min(uv.x, 1.0);
|
|
5869
|
+
weight = min(weight, uv.y);
|
|
5870
|
+
|
|
5871
|
+
if(validCount == 1 && csm == csmCount - 1){
|
|
5872
|
+
visibility = 1.0 - weight + csmShadowResult.x * weight;
|
|
5873
|
+
totalWeight = 1.0;
|
|
5874
|
+
}else{
|
|
5875
|
+
weight *= 1.0 - totalWeight;
|
|
5876
|
+
visibility += csmShadowResult.x * weight;
|
|
5877
|
+
totalWeight += weight;
|
|
5896
5878
|
}
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5879
|
+
// if(weight < 1.0){
|
|
5880
|
+
// visibility += 0.1;
|
|
5881
|
+
// }
|
|
5882
|
+
if(validCount >= 2 || totalWeight >= 0.99){
|
|
5883
|
+
csmLevel = csm;
|
|
5884
|
+
break;
|
|
5885
|
+
}
|
|
5886
|
+
}
|
|
5887
|
+
}
|
|
5888
|
+
totalWeight += 0.0001;
|
|
5889
|
+
if(validCount == 0){
|
|
5890
|
+
visibility = 1.0;
|
|
5891
|
+
}else{
|
|
5892
|
+
visibility = visibility / totalWeight ;
|
|
5893
|
+
}
|
|
5894
|
+
}else{
|
|
5895
|
+
shadowMatrix = globalUniform.shadowMatrix[shadowIndex];
|
|
5896
|
+
if(enableCSM) {
|
|
5897
|
+
shadowIndex += csmCount - 1;
|
|
5898
|
+
}
|
|
5899
|
+
visibility = directShadowMapingIndex(light, shadowMatrix, shadowIndex, shadowBias).x;
|
|
5900
|
+
}
|
|
5901
|
+
#else
|
|
5902
|
+
shadowMatrix = globalUniform.shadowMatrix[shadowIndex];
|
|
5903
|
+
visibility = directShadowMapingIndex(light, shadowMatrix, shadowIndex, shadowBias).x;
|
|
5904
|
+
#endif
|
|
5905
|
+
directShadowVisibility[i] = visibility;
|
|
5906
|
+
}
|
|
5903
5907
|
}
|
|
5908
|
+
|
|
5904
5909
|
}
|
|
5905
5910
|
|
|
5906
|
-
fn directShadowMapingIndex(light:LightData, matrix:mat4x4<f32>, depthTexIndex:i32, shadowBias:f32) -> vec4<f32>
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5911
|
+
fn directShadowMapingIndex(light:LightData, matrix:mat4x4<f32>, depthTexIndex:i32, shadowBias:f32) -> vec4<f32>
|
|
5912
|
+
{
|
|
5913
|
+
var visibility = 1.0;
|
|
5914
|
+
var isOutSideArea:f32 = 1.0;
|
|
5915
|
+
var varying_shadowUV:vec2<f32> = vec2<f32>(0.0);
|
|
5916
|
+
#if USE_SHADOWMAPING
|
|
5917
|
+
var shadowPosTmp = matrix * vec4<f32>(ORI_VertexVarying.vWorldPos.xyz, 1.0);
|
|
5918
|
+
var shadowPos = shadowPosTmp.xyz / shadowPosTmp.w;
|
|
5919
|
+
varying_shadowUV = shadowPos.xy * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5, 0.5);
|
|
5920
|
+
if (varying_shadowUV.x <= 1.0
|
|
5921
|
+
&& varying_shadowUV.x >= 0.0
|
|
5922
|
+
&& varying_shadowUV.y <= 1.0
|
|
5923
|
+
&& varying_shadowUV.y >= 0.0
|
|
5924
|
+
&& shadowPosTmp.z <= 1.0
|
|
5925
|
+
&& shadowPosTmp.z >= 0.0)
|
|
5926
|
+
{
|
|
5927
|
+
visibility = 0.0;
|
|
5928
|
+
isOutSideArea = 0.0;
|
|
5929
|
+
var uvOnePixel = 1.0 / vec2<f32>(globalUniform.shadowMapSize) ;
|
|
5930
|
+
var totalWeight = 0.0;
|
|
5931
|
+
// var NoL = (dot(normalize(ORI_VertexVarying.vWorldNormal), normalize(-light.direction)));
|
|
5932
|
+
// let v = max(NoL, 0.0) ;
|
|
5933
|
+
// var bias = max(0.05 * (dot(normalize(fragData.N), normalize(-light.direction)) ), -shadowBias);
|
|
5934
|
+
var bias = -0.005 * max(dot(fragData.N, -light.direction) , 0.0 );
|
|
5935
|
+
bias = clamp(bias, 0, 0.01) + -shadowBias;
|
|
5936
|
+
|
|
5937
|
+
// var bias = shadowBias / v;
|
|
5938
|
+
let bound = 1 ;
|
|
5939
|
+
for (var y = -bound; y <= bound; y++) {
|
|
5940
|
+
for (var x = -bound; x <= bound; x++) {
|
|
5941
|
+
var offset = vec2<f32>(f32(x), f32(y)) ;
|
|
5942
|
+
var offsetUV = offset * uvOnePixel ;
|
|
5943
|
+
var weight = min(length(offset),1.0) ;
|
|
5944
|
+
var depth = textureSampleCompareLevel(shadowMap, shadowMapSampler, varying_shadowUV + offsetUV , depthTexIndex, shadowPos.z - bias);
|
|
5945
|
+
if (depth < 0.5) {
|
|
5946
|
+
totalWeight += 1.0;
|
|
5947
|
+
}else{
|
|
5948
|
+
visibility += weight;
|
|
5949
|
+
totalWeight += weight;
|
|
5940
5950
|
}
|
|
5941
|
-
visibility /= totalWeight;
|
|
5942
5951
|
}
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
let light = lightBuffer[u32(ldx)];
|
|
5954
|
-
|
|
5955
|
-
#if USE_SHADOWMAPING
|
|
5956
|
-
let lightPos = light.position.xyz;
|
|
5957
|
-
var shadow = 0.0;
|
|
5958
|
-
let frgToLight = worldPos - lightPos.xyz;
|
|
5959
|
-
var dir: vec3<f32> = normalize(frgToLight);
|
|
5960
|
-
var len = length(frgToLight);
|
|
5961
|
-
var bias = max(shadowBias * globalUniform.far * (1.0 - dot(ORI_ShadingInput.Normal, dir)), 0.005);
|
|
5962
|
-
|
|
5963
|
-
#if USE_PCF_SHADOW
|
|
5964
|
-
let samples = 4.0;
|
|
5965
|
-
let sampleOffset = offset / (samples * 0.5);
|
|
5966
|
-
for (var x: f32 = -offset; x < offset; x += sampleOffset) {
|
|
5967
|
-
for (var y: f32 = -offset; y < offset; y += sampleOffset) {
|
|
5968
|
-
for (var z: f32 = -offset; z < offset; z += sampleOffset) {
|
|
5969
|
-
let offsetDir = normalize(dir.xyz + vec3<f32>(x, y, z));
|
|
5970
|
-
var depth = textureSampleLevel(pointShadowMap, pointShadowMapSampler, offsetDir, light.castShadow, 0);
|
|
5971
|
-
depth *= globalUniform.far;
|
|
5972
|
-
if ((len - bias) > depth) {
|
|
5973
|
-
shadow += 1.0 * dot(offsetDir, dir.xyz);
|
|
5974
|
-
}
|
|
5975
|
-
}
|
|
5976
|
-
}
|
|
5977
|
-
}
|
|
5978
|
-
shadow = min(max(shadow / (samples * samples * samples), 0.0), 1.0);
|
|
5979
|
-
#endif
|
|
5952
|
+
}
|
|
5953
|
+
visibility /= totalWeight;
|
|
5954
|
+
}
|
|
5955
|
+
#endif
|
|
5956
|
+
return vec4<f32>(visibility, isOutSideArea, varying_shadowUV);
|
|
5957
|
+
}
|
|
5958
|
+
|
|
5959
|
+
fn pointShadowMapCompare(shadowBias: f32){
|
|
5960
|
+
let worldPos = ORI_VertexVarying.vWorldPos.xyz;
|
|
5961
|
+
let offset = 0.1;
|
|
5980
5962
|
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5963
|
+
for (var i: i32 = 0; i < pointCount ; i = i + 1) {
|
|
5964
|
+
if( i >= globalUniform.nPointShadowStart && i < globalUniform.nPointShadowEnd ){
|
|
5965
|
+
let ldx = globalUniform.shadowLights[u32(i) / 4u][u32(i) % 4u];
|
|
5966
|
+
let light = lightBuffer[u32(ldx)] ;
|
|
5967
|
+
|
|
5968
|
+
#if USE_SHADOWMAPING
|
|
5969
|
+
let lightPos = light.position.xyz;
|
|
5970
|
+
var shadow = 0.0;
|
|
5971
|
+
let frgToLight = worldPos - lightPos.xyz;
|
|
5972
|
+
var dir: vec3<f32> = normalize(frgToLight);
|
|
5973
|
+
var len = length(frgToLight);
|
|
5974
|
+
var bias = max(shadowBias * globalUniform.far * (1.0 - dot(ORI_ShadingInput.Normal, dir)), 0.005);
|
|
5975
|
+
|
|
5976
|
+
#if USE_PCF_SHADOW
|
|
5977
|
+
let samples = 4.0;
|
|
5978
|
+
let sampleOffset = offset / (samples * 0.5);
|
|
5979
|
+
for (var x: f32 = -offset; x < offset; x += sampleOffset) {
|
|
5980
|
+
for (var y: f32 = -offset; y < offset; y += sampleOffset) {
|
|
5981
|
+
for (var z: f32 = -offset; z < offset; z += sampleOffset) {
|
|
5982
|
+
let compareZ = (len - bias) / globalUniform.far;
|
|
5983
|
+
var depth = textureSampleCompareLevel(pointShadowMap, pointShadowMapSampler, dir.xyz, light.castShadow, compareZ);
|
|
5984
|
+
if (depth < 0.5) {
|
|
5985
|
+
shadow = 1.0;
|
|
5991
5986
|
}
|
|
5987
|
+
for (var j = 0; j < pointCount ; j+=1 ){
|
|
5988
|
+
if(i32(light.castShadow) == j){
|
|
5989
|
+
pointShadows[j] = 1.0 - shadow;
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
}
|
|
5992
5993
|
}
|
|
5993
|
-
|
|
5994
|
+
}
|
|
5995
|
+
shadow = min(max(shadow / (samples * samples * samples), 0.0), 1.0);
|
|
5994
5996
|
#endif
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5997
|
+
|
|
5998
|
+
#if USE_SOFT_SHADOW
|
|
5999
|
+
let vDis = length(globalUniform.CameraPos.xyz - worldPos.xyz);
|
|
6000
|
+
let sampleRadies = globalUniform.shadowSoft;
|
|
6001
|
+
let samples = 20;
|
|
6002
|
+
for (var j: i32 = 0; j < samples; j += 1) {
|
|
6003
|
+
let offsetDir = normalize(dir.xyz + sampleOffsetDir[j] * sampleRadies);
|
|
6004
|
+
var depth = textureSampleCompareLevel(pointShadowMap, pointShadowMapSampler, offsetDir, light.castShadow, 0);
|
|
5998
6005
|
depth *= globalUniform.far;
|
|
5999
6006
|
if ((len - bias) > depth) {
|
|
6000
|
-
|
|
6007
|
+
shadow += 1.0 * dot(offsetDir, dir.xyz);
|
|
6001
6008
|
}
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6009
|
+
}
|
|
6010
|
+
shadow = min(max(shadow / f32(samples), 0.0), 1.0);
|
|
6011
|
+
#endif
|
|
6012
|
+
|
|
6013
|
+
#if USE_HARD_SHADOW
|
|
6014
|
+
var depth = textureSampleCompareLevel(pointShadowMap, pointShadowMapSampler, dir.xyz, light.castShadow, 0);
|
|
6015
|
+
depth *= globalUniform.far;
|
|
6016
|
+
if ((len - bias) > depth) {
|
|
6017
|
+
shadow = 1.0;
|
|
6018
|
+
}
|
|
6019
|
+
#endif
|
|
6020
|
+
for (var j = 0; j < pointCount ; j+=1 ) {
|
|
6021
|
+
if(i32(light.castShadow) == j){
|
|
6022
|
+
pointShadows[j] = 1.0 - shadow ;
|
|
6023
|
+
}
|
|
6024
|
+
}
|
|
6025
|
+
#endif
|
|
6026
|
+
}
|
|
6010
6027
|
}
|
|
6011
6028
|
}
|
|
6012
6029
|
|
|
@@ -6019,7 +6036,8 @@ var<uniform> materialUniform: MaterialUniform;
|
|
|
6019
6036
|
vec3<f32>(0.0, 1.0, 1.0), vec3<f32>(0.0, -1.0, 1.0), vec3<f32>(0.0, -1.0, -1.0), vec3<f32>(0.0, 1.0, -1.0),
|
|
6020
6037
|
);
|
|
6021
6038
|
#endif
|
|
6022
|
-
|
|
6039
|
+
`
|
|
6040
|
+
);
|
|
6023
6041
|
|
|
6024
6042
|
let Irradiance_frag = `
|
|
6025
6043
|
#include "IrradianceVolumeData_frag"
|
|
@@ -7174,19 +7192,10 @@ var<uniform> materialUniform: MaterialUniform;
|
|
|
7174
7192
|
@group(1) @binding(auto)
|
|
7175
7193
|
var normalMap: texture_2d<f32>;
|
|
7176
7194
|
|
|
7177
|
-
// #if USE_ARMC
|
|
7178
|
-
// @group(1) @binding(auto)
|
|
7179
|
-
// var maskMapSampler: sampler;
|
|
7180
|
-
// @group(1) @binding(auto)
|
|
7181
|
-
// var maskMap: texture_2d<f32>;
|
|
7182
|
-
// #endif
|
|
7183
|
-
|
|
7184
|
-
// #if USE_MR
|
|
7185
7195
|
@group(1) @binding(auto)
|
|
7186
7196
|
var maskMapSampler: sampler;
|
|
7187
7197
|
@group(1) @binding(auto)
|
|
7188
7198
|
var maskMap: texture_2d<f32>;
|
|
7189
|
-
// #endif
|
|
7190
7199
|
|
|
7191
7200
|
#if USE_AOTEX
|
|
7192
7201
|
@group(1) @binding(auto)
|
|
@@ -7214,7 +7223,6 @@ var<uniform> materialUniform: MaterialUniform;
|
|
|
7214
7223
|
|
|
7215
7224
|
#if USE_SRGB_ALBEDO
|
|
7216
7225
|
ORI_ShadingInput.BaseColor = textureSample(baseMap, baseMapSampler, uv ) ;
|
|
7217
|
-
// ORI_ShadingInput.BaseColor = sRGBToLinear(ORI_ShadingInput.BaseColor.rgb) ;
|
|
7218
7226
|
ORI_ShadingInput.BaseColor = vec4<f32>( ORI_ShadingInput.BaseColor * materialUniform.baseColor.rgb, ORI_ShadingInput.BaseColor.w * materialUniform.baseColor.a) ;
|
|
7219
7227
|
#else
|
|
7220
7228
|
ORI_ShadingInput.BaseColor = textureSample(baseMap, baseMapSampler, uv ) ;
|
|
@@ -7319,7 +7327,6 @@ var<uniform> materialUniform: MaterialUniform;
|
|
|
7319
7327
|
|
|
7320
7328
|
BxDFShading();
|
|
7321
7329
|
|
|
7322
|
-
// ORI_FragmentOutput.color = vec4<f32>(vec3<f32>(normal.rgb),1.0) ;
|
|
7323
7330
|
}
|
|
7324
7331
|
`
|
|
7325
7332
|
);
|
|
@@ -39958,7 +39965,7 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3<u32> , @builtin(global_inv
|
|
|
39958
39965
|
this.marker = new exports.Object3D();
|
|
39959
39966
|
const markerRenderer = this.marker.addComponent(exports.MeshRenderer);
|
|
39960
39967
|
markerRenderer.geometry = new SphereGeometry(0.1, 32, 16);
|
|
39961
|
-
markerRenderer.material = new
|
|
39968
|
+
markerRenderer.material = new UnLitMaterial();
|
|
39962
39969
|
markerRenderer.material.baseColor = this.positionValid ? new Color(0, 1, 0, 1) : new Color(1, 0, 0, 1);
|
|
39963
39970
|
this.addChild(this.marker);
|
|
39964
39971
|
this.marker.name = "WayPoint3DMarker";
|
|
@@ -40545,7 +40552,7 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3<u32> , @builtin(global_inv
|
|
|
40545
40552
|
}
|
|
40546
40553
|
}
|
|
40547
40554
|
|
|
40548
|
-
const version = "1.0.
|
|
40555
|
+
const version = "1.0.11";
|
|
40549
40556
|
|
|
40550
40557
|
class Engine3D {
|
|
40551
40558
|
/**
|