Water...
This commit is contained in:
81
water/water.material
Normal file
81
water/water.material
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
//----------------------------
|
||||
// Distortion effects
|
||||
//----------------------------
|
||||
vertex_program Examples/FresnelRefractReflectVP glsl glsles glslang hlsl
|
||||
{
|
||||
source Example_FresnelVp.glsl
|
||||
}
|
||||
fragment_program Examples/FresnelRefractReflectFP glsl glsles glslang hlsl
|
||||
{
|
||||
source Example_FresnelFp.glsl
|
||||
default_params
|
||||
{
|
||||
// assign samplers as required by GLSL
|
||||
param_named noiseMap int 0
|
||||
param_named reflectMap int 1
|
||||
param_named refractMap int 2
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
material Water
|
||||
{
|
||||
technique
|
||||
{
|
||||
pass
|
||||
{
|
||||
ambient 1.0 1.0 1.0 1.0
|
||||
diffuse 0.0 0.2 0.5 1.0
|
||||
/*
|
||||
vertex_program_ref Examples/FresnelRefractReflectVP
|
||||
{
|
||||
param_named_auto worldViewProjMatrix worldviewproj_matrix
|
||||
param_named_auto textureProjMatrix texture_worldviewproj_matrix 0
|
||||
param_named_auto eyePosition camera_position_object_space
|
||||
param_named_auto timeVal time 0.05
|
||||
param_named scroll float 1
|
||||
param_named scale float 1
|
||||
param_named noise float 1
|
||||
// scroll and noisePos will need updating per frame
|
||||
}
|
||||
fragment_program_ref Examples/FresnelRefractReflectFP
|
||||
{
|
||||
param_named fresnelBias float -0.1
|
||||
param_named fresnelScale float 1.8
|
||||
param_named fresnelPower float 8
|
||||
param_named tintColour float4 0 0.05 0.05 1
|
||||
param_named noiseScale float 0.05
|
||||
}
|
||||
*/
|
||||
vertex_program_ref water_vp
|
||||
{
|
||||
}
|
||||
fragment_program_ref water_fp
|
||||
{
|
||||
}
|
||||
// Noise
|
||||
texture_unit
|
||||
{
|
||||
// Perlin noise volume
|
||||
texture waves2.png
|
||||
// min / mag filtering, no mip
|
||||
filtering linear linear none
|
||||
}
|
||||
// Reflection
|
||||
texture_unit
|
||||
{
|
||||
content_type compositor Fresnel reflection
|
||||
tex_address_mode mirror
|
||||
}
|
||||
// Refraction
|
||||
texture_unit
|
||||
{
|
||||
content_type compositor Fresnel refraction
|
||||
tex_address_mode mirror
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user