Страница 1 из 1
хочется: Transparent/Specular +EmissiveColor
Добавлено:
18 май 2009, 22:23
gnoblin
Во встроенном шейдере Transparent/Specular не хватает параметра EmissiveColor.
Поможете добавить?
Я слабо пока рублю в создании своих шейдеров).
Спс.
Re: хочется: Transparent/Specular +EmissiveColor
Добавлено:
19 май 2009, 03:24
Const_47
Для фиксированного конвеера в два прохода
- Код: Выделить всё
Shader "Transparent/Specular+Emmisive" {
Properties {
_Color ("Main Color", Color) = (1,1,1,0)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags {"RenderType"="Transparent" "Queue"="Transparent"}
Pass {
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
}
Lighting On
SeperateSpecular On
SetTexture [_MainTex] {
Combine texture * primary DOUBLE, texture * primary
}
}
Pass {
Blend One One
Color [_Emission]
}
}
}
или в один
- Код: Выделить всё
Shader "Transparent/Specular+Emmisive(2)" {
Properties {
_Color ("Main Color", Color) = (1,1,1,0)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags {"RenderType"="Transparent" "Queue"="Transparent"}
Pass {
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Lighting On
SeperateSpecular On
SetTexture [_MainTex] {
Combine texture * primary DOUBLE, texture * primary
}
}
}
}
По "традиции" от Transparent/Specular прозрачность в альфе текстуры.
Re: хочется: Transparent/Specular +EmissiveColor
Добавлено:
19 май 2009, 06:43
toni_3d
Гоблин, кинь картинку что получилось, для наглядности
Re: хочется: Transparent/Specular +EmissiveColor
Добавлено:
19 май 2009, 07:29
Neodrop
А лучше демо-комозицию в студию!
Re: хочется: Transparent/Specular +EmissiveColor
Добавлено:
19 май 2009, 08:17
gnoblin
Ок, чуть позже попробую и закину. Спс!