Skip to content

Commit

Permalink
code format and add sliders for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
xubing0906 committed May 28, 2022
1 parent 63878de commit e91298c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions editor/assets/effects/dcc/imported-metallic-roughness.effect
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ CCEffect %{
mainTexture: { value: grey, target: albedoMap, editor: { displayName: BaseColorMap } }
baseWeightMap: { value: grey }
albedoScale: { value: 1.0, editor: { displayName: BaseWeight } }
roughness: { value: 1.0 }
roughness: { value: 1.0, editor: { slide: true, range: [0, 1.0], step: 0.001 } }
roughnessMap: { value: grey }
metallic: { value: 1.0 }
metallic: { value: 1.0, editor: { slide: true, range: [0, 1.0], step: 0.001 } }
metallicMap: { value: grey }
occlusion: { value: 1.0 }
occlusion: { value: 1.0, editor: { slide: true, range: [0, 1.0], step: 0.001 } }
occlusionMap: { value: white }
emissiveScale: { value: 1.0, editor: { displayName: Emissive } }
emissiveScaleMap: { value: grey, editor: { displayName: EmissiveMap } }
Expand Down
18 changes: 9 additions & 9 deletions editor/assets/effects/dcc/imported-specular-glossiness.effect
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ CCEffect %{
- vert: standard-vs
frag: standard-fs
properties: &props
mainTexture: { value: grey, target: albedoMap, editor: { displayName: DiffuseMap }}
mainColor: { value: [1.0,1.0,1.0,1.0], target: diffuseColor, linear: true, editor: { displayName: DiffuseColor, type: color }}
mainTexture: { value: grey, target: albedoMap, editor: { displayName: DiffuseMap } }
mainColor: { value: [1.0, 1.0, 1.0, 1.0], target: diffuseColor, linear: true, editor: { displayName: DiffuseColor, type: color } }
albedoScale: { value: 1.0, target: diffuseFactor, editor: { displayName: diffuseFactor } }
alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } }
alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST, slide: true, range: [0, 1.0], step: 0.001 } }
emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } }
emissiveMap: { value: grey }
shininessExponentMap: { value: grey, editor: { parent: '!HAS_EXPORTED_GLOSSINESS' } }
shininessExponent: { value: 100.0, editor: { parent: '!HAS_EXPORTED_GLOSSINESS' } }
specularColor: { value: [0.0,0.0,0.0,0.0], linear: true, editor: { displayName: SpecularColor, type: color }}
specularColor: { value: [0.0, 0.0, 0.0, 0.0], linear: true, editor: { displayName: SpecularColor, type: color } }
specularMap: { value: grey, editor: { parent: '!HAS_EXPORTED_METALLIC' } }
specularFactor: { value: 1.0, editor: { parent: '!HAS_EXPORTED_METALLIC' } }
transparencyMap: { value: grey, editor: { displayName: TransparencyMap} }
transparencyFactor: { value: 0.0 }
transparencyMap: { value: grey, editor: { displayName: TransparencyMap } }
transparencyFactor: { value: 0.0, editor: { slide: true, range: [0, 1.0], step: 0.001 } }
tilingOffset: { value: [1.0, 1.0, 0.0, 0.0] }
normalStrength: { value: 1.0, target: normalScale, editor: { displayName: bumpFactor, parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } }
normalMap: { value: normal }
glossiness: { value: 0.0, editor: { parent: HAS_EXPORTED_GLOSSINESS, slide: true, range: [0, 1.0], step: 0.001 }}
metallic: { value: 0.0, editor: { parent: HAS_EXPORTED_METALLIC, slide: true, range: [0, 1.0], step: 0.001 }}
metallicMap: { value: grey, editor: {parent: HAS_EXPORTED_METALLIC } }
glossiness: { value: 0.0, editor: { parent: HAS_EXPORTED_GLOSSINESS, slide: true, range: [0, 1.0], step: 0.001 } }
metallic: { value: 0.0, editor: { parent: HAS_EXPORTED_METALLIC, slide: true, range: [0, 1.0], step: 0.001 } }
metallicMap: { value: grey, editor: { parent: HAS_EXPORTED_METALLIC } }
- &forward-add
vert: standard-vs
frag: standard-fs
Expand Down

0 comments on commit e91298c

Please sign in to comment.