John Edwards thatgamecompany Shipping Sharp mips Anisotropic masking Glitter specular Ocean specular Diffuse contrast Detail heightmaps Shipping Sharp mips Anisotropic mask ID: 142383
Download Presentation The PPT/PDF document "Sand Rendering in Journey" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Sand Rendering in Journey
John Edwards
thatgamecompanySlide2Slide3Slide4Slide5Slide6Slide7Slide8Slide9Slide10Slide11Slide12Slide13
ShippingSlide14
- Sharp
mipsSlide15
Anisotropic maskingSlide16
Glitter
specularSlide17
Ocean
specularSlide18
Diffuse contrastSlide19
Detail
heightmapsSlide20
ShippingSlide21
- Sharp
mipsSlide22
- Anisotropic maskSlide23
- Glitter
specularSlide24
- Ocean
specularSlide25
- Diffuse contrastSlide26
- Detail
heightmapsSlide27Slide28Slide29Slide30Slide31
Sharp
mips
onSlide32
Sharp
mips
offSlide33Slide34Slide35Slide36Slide37Slide38Slide39Slide40Slide41Slide42Slide43
Glitter onSlide44
Glitter offSlide45
Glitter onSlide46
Glitter offSlide47
Specular
glitterSlide48Slide49Slide50Slide51Slide52
Aniso
failure mask offSlide53Slide54
Aniso
offSlide55
Aniso
16Slide56
Aniso
offSlide57Slide58Slide59Slide60
Specular
onSlide61
Specular
offSlide62Slide63
“ocean of sand”: 41,700
“ocean of lard”: 111,000Slide64
Shipping diffuseSlide65
Lambert diffuseSlide66Slide67Slide68
half
OrenNayarDiffuse
( half3 light, half3 view, half3 norm, half roughness )
{
half
VdotN
= dot( view, norm );
half
LdotN
= dot( light, norm );
half
cos_theta_i
=
LdotN
;
half
theta_r
=
acos
(
VdotN
);
half
theta_i
=
acos
(
cos_theta_i
);
half
cos_phi_diff
= dot( normalize( view - norm *
VdotN
),
normalize( light - norm *
LdotN
) );
half alpha = max(
theta_i
,
theta_r
) ;
half beta = min(
theta_i
,
theta_r
) ;
half sigma2 = roughness * roughness;
half A = 1.0 - 0.5 * sigma2 / (sigma2 + 0.33);
half B = 0.45 * sigma2 / (sigma2 + 0.09);
return saturate(
cos_theta_i
) *
(A + (B * saturate(
cos_phi_diff
) * sin(alpha) * tan(beta)));
}Slide69
void
reverse(
char
* s,
int
l) {
do
{
random_shuffle
(s, s + l);
}
while
(!verify(s));
}Slide70
saturate( dot( N, L ) );Slide71
saturate( 4 * dot( N, L ) );Slide72
saturate( 4 * dot( N, L ) );
N.y
*= 0.3;Slide73
Detail
heightmaps
onSlide74
Detail
heightmaps
offSlide75Slide76Slide77
Special thanks to:
SPU programmer extraordinaire: Martin Middleton
Art Director, Chief shadow requester: Matt Nava
Mathematicians – email john@thatgamecompany.comSlide78
jobs@thatgamecompany.com