ShaderRoof

From SimsWiki
Revision as of 00:17, 19 March 2007 by Niol (Talk | contribs)

Jump to: navigation, search

EP2-NL
0xCD7FE87A
0x1C0532FA
0x9B41704F
0xFF5D60B5
# roof

#
# roof material definitions.
#

# material for roof preview when they're displayed
define RoofPreviewMaterial()
   material
      shader -layer 9999
         vertexFormatPred position      0 true
         vertexFormatPred normal        0 true
         vertexFormatPred blendindices  0 false
         vertexFormatPred targetindices 0 false
         
         pass -fixedFunction         
            colorScalar (0.5, 0.4, 0.4, 1.0)         
            create LightingStatesNoStdLights()
            depthTest true -enableDepthWrite true

	    alphaBlend srcFactor(srcAlpha) add dstFactor(invSrcAlpha)		

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end

	pass -fixedFunction        
            create LightingStatesNoStdLights()
            fillmode wireframe
	    cullmode none
            depthTest true -enableDepthWrite false
            colorScalar (0, 0, 0)

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end

      end
   end
enddef

define RoofPreviewMaterialBack()
   material
      shader -layer 9999
         vertexFormatPred position      0 true
         vertexFormatPred normal        0 true
         vertexFormatPred blendindices  0 false
         vertexFormatPred targetindices 0 false
         
         pass -fixedFunction         
            colorScalar (0.25, 0.1, 0.1, 1.0)         
            create LightingStatesNoStdLights()

            depthTest true -enableDepthWrite true

	    alphaBlend srcFactor(srcAlpha) add dstFactor(invSrcAlpha)		

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end

      end
   end
enddef

define RoofPreviewMaterialStrip()
   material
      shader -layer 9999
         vertexFormatPred position      0 true
         vertexFormatPred blendindices  0 false
         vertexFormatPred targetindices 0 false
         
         pass -fixedFunction         
            colorScalar (1.0, 1.0, 1.0, 1.0)         
            create LightingStatesNoStdLights()

            depthTest true -enableDepthWrite false	    

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end

      end
   end
enddef

define RoofPreviewMaterialUpperStrip()
   material
      shader -layer 9999
         vertexFormatPred position      0 true
         vertexFormatPred blendindices  0 false
         vertexFormatPred targetindices 0 false
         
         pass -fixedFunction         
            colorScalar (1.0, 0.0, 0.0, 1.0)         
            create LightingStatesNoStdLights()

            depthTest true -enableDepthWrite false

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end

      end
   end
enddef

define RoofPreviewMaterialTopBoundary()
   material
      shader -layer 9999
         vertexFormatPred position      0 true
         vertexFormatPred normal        0 true
         vertexFormatPred blendindices  0 false
         vertexFormatPred targetindices 0 false
         
         pass -fixedFunction         
            colorScalar (0.4, 0, 0.1, 1.0)         
            create LightingStatesNoStdLights()

            depthTest true -enableDepthWrite true

	    alphaBlend srcFactor(srcAlpha) add dstFactor(invSrcAlpha)		

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end

	pass -fixedFunction        
            create LightingStatesNoStdLights()
            fillmode wireframe
            depthTest true -enableDepthWrite false
            colorScalar (0, 0, 0)

            stage
               textureBlend select(colorScalar) select(colorScalar)
            end 
         end


      end
   end
enddef

materialDefinition RoofPreview
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.4, 0.385, 0.38)
   addParam   stdMatBaseTextureName roof-manor
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatCullMode none
end


materialDefinition RoofUnder
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.8, 0.8, 0.8)
   addParam   stdMatBaseTextureName roof-manor-under
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatCullMode none
end

materialDefinition RoofTrim
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.8, 0.8, 0.8)
   addParam   stdMatBaseTextureName roof-manor-trim
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatCullMode none
end

materialDefinition RoofPreviewTopBoundary
   setDefinition RoofPreviewMaterialTopBoundary
end

# texture, lit, normal mappedm, no specular
materialDefinition RoofTop
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.4, 0.385, 0.38)
   addParam   stdMatBaseTextureName roof-manor
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatNormalMapTextureName roof-manor-bump
   addParam   stdMatNormalMapTextureEnabled true
   addParam   stdMatBaseTextureAddressingU clamp
   addParam   stdMatBaseTextureAddressingV clamp
   addParam   stdMatBaseTextureAddressingW clamp
   addParam   stdMatNormalMapTextureAddressingU clamp
   addParam   stdMatNormalMapTextureAddressingV clamp
   addParam   stdMatNormalMapTextureAddressingW clamp
   addParam   stdMatCullMode none
end


materialDefinition RoofEdges
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.8, 0.8, 0.8)
   addParam   stdMatBaseTextureName roof-manor-edges
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatCullMode none
end

# texture, lit, normal mappedm, no specular
materialDefinition RoofTopThumbnail
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.8, 0.75, 0.75)
   addParam   stdMatBaseTextureName roof-manor
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatNormalMapTextureName roof-manor-bump
   addParam   stdMatNormalMapTextureEnabled true
end

# texture, lit, normal mappedm, no specular
# modify this material for roof highlights
materialDefinition RoofTopHighlight
   setDefinition StandardMaterial
   addParam   stdMatSpecPower 0
   addParam   stdMatDiffCoef (0.4, 0.385, 0.38)
   addParam   stdMatBaseTextureName roof-redtile
   addParam   stdMatBaseTextureEnabled true
   addParam   stdMatNormalMapTextureName roof-redtile-bump
   addParam   stdMatNormalMapTextureEnabled true
   addParam   stdMatBaseTextureAddressingU clamp
   addParam   stdMatBaseTextureAddressingV clamp
   addParam   stdMatBaseTextureAddressingW clamp
   addParam   stdMatNormalMapTextureAddressingU clamp
   addParam   stdMatNormalMapTextureAddressingV clamp
   addParam   stdMatNormalMapTextureAddressingW clamp
end

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox