Advertisement
Guest User

Untitled

a guest
May 30th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. SSMF features undocumented as of Spring 88.0
  2.  
  3. skyReflectModTex (RGBA, A-channel unused)
  4. should be the same size as specularTex
  5. modifies the DIFFUSE color as follows
  6.  
  7. diffuseColor.r = diffuseColor.r * (1 - skyReflectModTex.r) + reflectionColor.r * skyReflectModTex.r
  8. diffuseColor.g = diffuseColor.g * (1 - skyReflectModTex.g) + reflectionColor.g * skyReflectModTex.g
  9. diffuseColor.b = diffuseColor.b * (1 - skyReflectModTex.b) + reflectionColor.b * skyReflectModTex.b
  10.  
  11. (before any other shading calculations use diffuseColor)
  12.  
  13. can be used to suggest a surface composed of eg. ice or crystals
  14.  
  15. lightEmissionTex (RGBA)
  16. should be the same size as specularTex
  17. modifies the FRAGMENT color as follows
  18.  
  19. fragmentColor.rgb = fragmentColor.rgb * (1 - lightEmissionTex.a) + lightEmissionTex.rgb
  20.  
  21. (after the diffuse + detail texturing stages and shadows,
  22. but before specular/dynamic lighting and fog are applied)
  23.  
  24. can be used to accentuate eg. metal spots in shadowed regions
  25.  
  26. detailNormalTex (RGBA)
  27. should be the same size as specularTex
  28. modifies the SHADING normal as follows
  29.  
  30. shadingNormal.xyz = NORMALIZE(terrainNormal.xyz * (1 - detailNormalTex.a) + detailNormalTex.rgb)
  31.  
  32. (normals are assumed to be given in tangent-space
  33. and with the usual XYZ2RGB encoding scheme, where
  34. texture.rgb = normal.xyz * 0.5 + 0.5)
  35.  
  36. can be used to suggest surface details while keeping terrain flat
  37.  
  38. parallaxHeightTex (RGBA)
  39. should be the same size as specularTex
  40.  
  41. modifies the diffuse, normal, and specular
  42. TEXTURE COORDINATES before sampling is done
  43.  
  44. height, scale, and bias parameters are packed
  45. as follows to produce a texel offset-factor f
  46.  
  47. h = (parallaxHeightTex.r * 65280 + parallaxHeightTex.g * 256) / 65536
  48. s = (parallaxHeightTex.b)
  49. b = (parallaxHeightTex.a - 0.5)
  50. f = h * s + b
  51.  
  52. the mathematics probably won't make much sense,
  53. so it's better to just experiment with this one
  54. (tip: you want to end up with small values for s
  55. and b, eg. s=0.04 and b=-0.02, so for now set the
  56. blue channel pixels to 10 and alpha channel pixels
  57. to 75 in your editing tool -- remember that from a
  58. graphics card's perspective the pixels have values
  59. between 0 and 1)
  60.  
  61. can be used to suggest surface details while keeping terrain flat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement