Metal for Ray Tracing Acceleration
|
|
- Gerard Barnett
- 5 years ago
- Views:
Transcription
1 Session #WWDC18 Metal for Ray Tracing Acceleration 606 Sean James, GPU Software Engineer Wayne Lister, GPU Software Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
2 Metal Performance Shaders GPU-accelerated primitives, optimized for ios and macos Image processing Linear algebra Machine learning inference Using Metal 2 for Compute WWDC 2017 What s New in Metal, Part 2 WWDC 2016
3 Metal Performance Shaders NEW GPU-accelerated primitives, optimized for ios and macos Image processing Linear algebra Machine learning inference and training Metal for Accelerating Machine Learning Hall 3 Thursday 4:00PM
4 Metal Performance Shaders NEW GPU-accelerated primitives, optimized for ios and macos Image processing Linear algebra Machine learning inference and training Ray tracing Metal for Accelerating Machine Learning Hall 3 Thursday 4:00PM
5 Ray Tracing Tracing a ray s path as it interacts with a scene
6 Ray Tracing Tracing a ray s path as it interacts with a scene
7 Ray Tracing Tracing a ray s path as it interacts with a scene Applications Rendering Audio and physics simulation Collision detection AI and pathfinding
8 Rasterization Projects triangles onto the screen one at a time
9 Rasterization Projects triangles onto the screen one at a time Fast method of choice for games and real-time applications
10 Rasterization Projects triangles onto the screen one at a time Fast method of choice for games and real-time applications Difficult to model behavior of light
11 Ray Tracing Reflections Can be computed accurately with ray tracing Amazon Lumberyard Bistro 2017 Amazon.com, Ray traced with Metal,
12 Ray Tracing Soft shadows Can be computed directly with ray tracing Realistic transition from hard to soft shadows
13 Ray Tracing Global illumination Naturally modeled with ray tracing Sponza Atrium 2009 Frank Meinl, Crytek, Ray traced with Metal,
14 Ray Tracing Many other effects ambient occlusion, refraction, area lights, depth of field, motion blur
15 Ray Tracing Many other effects ambient occlusion, refraction, area lights, depth of field, motion blur Method of choice for photorealistic, offline rendering
16 Ray Tracing Many other effects ambient occlusion, refraction, area lights, depth of field, motion blur Method of choice for photorealistic, offline rendering Significantly more computationally expensive doing more work to simulate physical effects
17 Rendering with Ray Tracing Work backwards from camera to light source
18 Rendering with Ray Tracing Work backwards from camera to light source Cast primary rays from the camera into the scene
19 Rendering with Ray Tracing Work backwards from camera to light source Cast primary rays from the camera into the scene Compute shading at intersection points
20 Rendering with Ray Tracing Compute direct lighting contribution
21 Rendering with Ray Tracing Compute direct lighting contribution Cast shadow rays from intersection point to light source
22 Rendering with Ray Tracing Compute direct lighting contribution Cast shadow rays from intersection point to light source In shadow if shadow ray does not reach light
23 Rendering with Ray Tracing Cast secondary rays from intersection point in random directions
24 Rendering with Ray Tracing Cast secondary rays from intersection point in random directions
25 Rendering with Ray Tracing Cast secondary rays from intersection point in random directions
26 Rendering with Ray Tracing Cast secondary rays from intersection point in random directions Add direct lighting reflected from secondary intersection point
27 Rendering with Ray Tracing Cast secondary rays from intersection point in random directions Add direct lighting reflected from secondary intersection point
28 Rendering with Ray Tracing Cast secondary rays from intersection point in random directions Add direct lighting reflected from secondary intersection point Repeat to simulate light bouncing
29 Rendering with Ray Tracing Ray count grows exponentially with number of bounces
30 Rendering with Ray Tracing Ray count grows exponentially with number of bounces Avoid growth one shadow ray and secondary ray per bounce
31 Rendering with Ray Tracing Ray count grows exponentially with number of bounces Avoid growth one shadow ray and secondary ray per bounce
32 Rendering with Ray Tracing Ray count grows exponentially with number of bounces Avoid growth one shadow ray and secondary ray per bounce Average over multiple frames
33 Rendering with Ray Tracing
34 Rendering with Ray Tracing Generate Primary Rays
35 Rendering with Ray Tracing Primary Rays Generate Primary Rays Intersect with Scene
36 Rendering with Ray Tracing Primary Rays Intersections Generate Primary Rays Intersect with Scene Shading
37 Rendering with Ray Tracing Primary Rays Intersections Generate Primary Rays Intersect with Scene Shading Shadow, Secondary Rays
38 Rendering with Ray Tracing Primary Rays Intersections Generate Primary Rays Intersect with Scene Shading Shadow, Secondary Rays
39 Rendering with Ray Tracing Primary Rays Intersections Generate Primary Rays Intersect with Scene Shading Shadow, Secondary Rays Image
40 Rendering with Ray Tracing Primary Rays Intersections Generate Primary Rays Intersect with Scene Shading Shadow, Secondary Rays Image
41 MPSRayIntersector NEW Ray intersector accelerates ray/triangle intersection tests on the GPU Intersector
42 MPSRayIntersector NEW Ray intersector accelerates ray/triangle intersection tests on the GPU Intersector Accepts batches of rays in a Metal buffer Ray Buffer
43 MPSRayIntersector NEW Ray intersector accelerates ray/triangle intersection tests on the GPU Intersector Accepts batches of rays in a Metal buffer Ray Buffer Intersection Buffer Returns one intersection per ray
44 MPSRayIntersector NEW Ray intersector accelerates ray/triangle intersection tests on the GPU Intersector Accepts batches of rays in a Metal buffer Ray Buffer Intersection Buffer Returns one intersection per ray Command Buffer Encodes into a Metal command buffer
45 Accelerating Ray/Scene Intersection
46 Accelerating Ray/Scene Intersection
47 Accelerating Ray/Scene Intersection
48 Accelerating Ray/Scene Intersection
49 Accelerating Ray/Scene Intersection
50 Accelerating Ray/Scene Intersection
51 Accelerating Ray/Scene Intersection
52 Accelerating Ray/Scene Intersection
53 Accelerating Ray/Scene Intersection
54 Accelerating Ray/Scene Intersection
55 Accelerating Ray/Scene Intersection
56 Accelerating Ray/Scene Intersection
57 MPSRayIntersector Scene represented by triangle vertices in a vertex buffer Intersector Ray Buffer Intersection Buffer Vertex Buffer
58 MPSRayIntersector Scene represented by triangle vertices in a vertex buffer Intersector Build an acceleration structure over the vertex buffer Ray Buffer Intersection Buffer Acceleration Structure Vertex Buffer
59 MPSRayIntersector Scene represented by triangle vertices in a vertex buffer Intersector Build an acceleration structure over the vertex buffer Ray Buffer Intersection Buffer Acceleration Pass acceleration structure to intersector Structure Vertex Buffer
60 Ray Tracing with Metal Performance Shaders
61 Ray Tracing with Metal Performance Shaders Primary Rays and Shading
62 Ray Tracing with Metal Performance Shaders Primary Rays and Shading Shadow Rays
63 Ray Tracing with Metal Performance Shaders Primary Rays and Shading Shadow Rays Secondary Rays
64 Ray Tracing with Metal Performance Shaders Primary Rays and Shading Shadow Rays Secondary Rays
65 Primary Rays and Shading
66 Primary Rays and Shading Intersector
67 Primary Rays and Shading Intersector Acceleration Structure Vertex Buffer
68 Primary Rays and Shading Generate Primary Rays Intersector Ray Buffer Acceleration Structure Vertex Buffer
69 Primary Rays and Shading Generate Primary Rays Intersector Ray Buffer Intersection Buffer Acceleration Structure Vertex Buffer
70 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
71 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
72 Creating an Intersector Create an MPSRayIntersector with a Metal device: let intersector = MPSRayIntersector(device: device)
73 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
74 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
75 Creating an Acceleration Structure Create an MPSTriangleAccelerationStructure with a Metal device: let accelerationstructure = MPSTriangleAccelerationStructure(device: device)
76 Creating an Acceleration Structure Create an MPSTriangleAccelerationStructure with a Metal device: let accelerationstructure = MPSTriangleAccelerationStructure(device: device) Assign vertex buffer: accelerationstructure.vertexbuffer = vertexbuffer accelerationstructure.trianglecount = trianglecount
77 Creating an Acceleration Structure Create an MPSTriangleAccelerationStructure with a Metal device: let accelerationstructure = MPSTriangleAccelerationStructure(device: device) Assign vertex buffer: accelerationstructure.vertexbuffer = vertexbuffer accelerationstructure.trianglecount = trianglecount Build acceleration structure: accelerationstructure.rebuild()
78 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
79 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
80 Generating Primary Rays Launch one thread per pixel
81 Generating Primary Rays Launch one thread per pixel Write Ray struct to ray buffer: struct Ray { float3 origin; float3 direction; };
82 Generating Primary Rays Launch one thread per pixel Write Ray struct to ray buffer: struct Ray { float3 origin; float3 direction; };
83 Generating Primary Rays Launch one thread per pixel Write Ray struct to ray buffer: struct Ray { float3 origin; float3 direction; }; Origin
84 Generating Primary Rays Launch one thread per pixel Write Ray struct to ray buffer: struct Ray { float3 origin; float3 direction; Direction }; Origin
85 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
86 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
87 Finding Intersections with the Scene Encode intersection test into a command buffer: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
88 Finding Intersections with the Scene Encode intersection test into a command buffer: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
89 Finding Intersections with the Scene Encode intersection test into a command buffer: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
90 Finding Intersections with the Scene Encode intersection test into a command buffer: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
91 Finding Intersections with the Scene Encode intersection test into a command buffer: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
92 Finding Intersections with the Scene Encode intersection test into a command buffer: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
93 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
94 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
95 Shading Apply lighting and textures similar to fragment shader Depends on intersection point and vertex attributes
96 Shading struct Intersection { float distance; int primitiveindex; float2 coordinates; }; Intersection point
97 Shading struct Intersection { float distance; int primitiveindex; float2 coordinates; }; Intersection point Direction Origin
98 Distance Shading struct Intersection { float distance; int primitiveindex; float2 coordinates; }; Intersection point Direction Origin
99 Distance Shading struct Intersection { float distance; int primitiveindex; float2 coordinates; }; Intersection point Direction Origin
100 Distance Shading struct Intersection { float distance; int primitiveindex; float2 coordinates; }; Intersection point Direction Origin
101 <latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafoazamzk04yzvbbzkwqlny <latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbbu0ik0horevhygv2 u<latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafo <latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbb Shading struct Intersection { float distance; int primitiveindex; v<latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbb float2 coordinates; }; Barycentric coordinates u<latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafoazamzk04yzvbbzkwqlny and v<latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbbu0ik0horevhygv2
102 <latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafoazamzk04yzvbbzkwqlny <latexit sha1_base64="tasnsc1efest/gvdsvyv3+hx72e=">aaab9hicbvbns8naej3ur1q/qh69lbbbiygrqutbkhrxwmf+qbvkzrtpl242cxdtkaw/w4shrbz6y7z5b9ymedt6yodx3gwz8/yym6ud59pkrayurw/knwtb2zu7e8x9g6akeklog0q8km0fk8qzoa3nnkftwfic+py2/nh13g+nqvqsend6elmvxapbakawnpl3gc6ri85qymrck5yc+6jarrov5npoimvsggz1xvgj249ielkhccdkdvwn1t4us80ip7ncn1e0xmseb7rjqmahvd40pxqgtozsr0ektqmnuvxnxbshsk1c33sgwa/vx28u/ud1eh1uvsktcakpiitfqckrjta8adrnkhlnj4zgipm5fzehlphok1mhdsf7ezl8h9a8t13hdm/lpdpvfkcejuaytsgfcttgburqaal38ajp8gknrsfr1xpbtoasboyqfsf6/wkgp5ak</latexit> <latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbbu0ik0horevhygv2 u<latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafo <latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbb w<latexit sha1_base64="0esugjwib4mzf14746qxlnjzwd4=">aaab6hicbvbns8naej3ur1q/qh69lbbbu0ik0horevhygv2anptndtou3wzc7kypob/aiwdfvpqtvp Shading struct Intersection { float distance; int primitiveindex; v<latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbb float2 coordinates; }; Barycentric coordinates u<latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafoazamzk04yzvbbzkwqlny and v<latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbbu0ik0horevhygv2 Third coordinate: w =1 u v
103 <latexit sha1_base64="mzz9fjlkacbl/xz0lhwkxqawcnw=">aaab/nicbvdlssnafl3xwesrkq7cdbzbeepscq27ohuxfewd2ham00k7dpjgzlipoecvuhghifu/w51/4zsnonydwz2ccy/3zvfizqsyre9jzxvtfwozsfxc3tnd2zcpdtsysgshlrlxshq9lclniw0ppjjtxoliwoo0442v535nqovkuxinpjf1ajwmmc8ivlpyzemetv0lxacjrrau97pwxlnkls/r1bpdq3bzyrbmspcj6zof/ufekocginaszc+2yuwkwchgoj0v+4mkmszjpkq9tumcuomk2fkzdkavafijov+oukb+nehxiou08hrngnvi/vxm4n9el1f+3ulzgcekhmsxye84uhgaz4egtfci+fqttatttyiywgitprmrzihkx14m3yg0k2xbktu31vljko+jacdwcudgqw0acannaagbfb7hgv6mb+pjedxefq0rrj5zbl9gvh8b/vys6w==</latexit> <latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafoazamzk04yzvbbzkwqlny <latexit sha1_base64="tasnsc1efest/gvdsvyv3+hx72e=">aaab9hicbvbns8naej3ur1q/qh69lbbbiygrqutbkhrxwmf+qbvkzrtpl242cxdtkaw/w4shrbz6y7z5b9ymedt6yodx3gwz8/yym6ud59pkrayurw/knwtb2zu7e8x9g6akeklog0q8km0fk8qzoa3nnkftwfic+py2/nh13g+nqvqsend6elmvxapbakawnpl3gc6ri85qymrck5yc+6jarrov5npoimvsggz1xvgj249ielkhccdkdvwn1t4us80ip7ncn1e0xmseb7rjqmahvd40pxqgtozsr0ektqmnuvxnxbshsk1c33sgwa/vx28u/ud1eh1uvsktcakpiitfqckrjta8adrnkhlnj4zgipm5fzehlphok1mhdsf7ezl8h9a8t13hdm/lpdpvfkcejuaytsgfcttgburqaal38ajp8gknrsfr1xpbtoasboyqfsf6/wkgp5ak</latexit> <latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbbu0ik0horevhygv2 <latexit sha1_base64="bjq581p2y2ddiiircxztkzqijgu=">aaab6nicbvbns8naej3ur1q/qh69lbbbu0ik0hgrevfy0x5ag8pmu2mxbjzhdyou0j/gxymix <latexit sha1_base64="pqkrp9yarzezhzuqjypjliru/py=">aaab6nicbvbns8naej3ur1q/qh69lbbbu0ik0hgrevfy0x5ag8pmu2mxbjzhdyou0j/gxymixv1f3v u<latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafo <latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbb w<latexit sha1_base64="0esugjwib4mzf14746qxlnjzwd4=">aaab6hicbvbns8naej3ur1q/qh69lbbbu0ik0horevhygv2anptndtou3wzc7kypob/aiwdfvpqtvp <latexit sha1_base64="mccqtvj35ad8cqgqotebtfqcs3y=">aaab6nicbvbns8naej3ur1o/wvxozbeinkjscq23ohepfe0htkfstpt26wytdjdccf0jxjwo4tvf5m Shading V 1 struct Intersection { float distance; int primitiveindex; v<latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbb float2 coordinates; }; Barycentric coordinates u<latexit sha1_base64="5en9wswlw/z88jnn61xxnby8qog=">aaab6hicbvdlsgnbeoynrxhfuy9ebopgadkvifew9oixafoazamzk04yzvbbzkwqlny and v<latexit sha1_base64="wlcyvdhfvigotgafrxemxnak0f0=">aaab6hicbvbns8naen3ur1q/qh69lbbbu0ik0horevhygv2 V 0 V 2 Third coordinate: w =1 u v Interpolated: uv 0 + vv 1 + wv 2
104 Primary Rays and Shading Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image Vertex Buffer
105
106 Primary Rays and Shading Shadow Rays Secondary Rays
107 Primary Rays and Shading Shadow Rays Secondary Rays
108 Shadow Rays Check if shading point is in shadow before adding color to image
109 Shadow Rays Check if shading point is in shadow before adding color to image Cast a ray from shading point to light source
110 Shadow Rays Check if shading point is in shadow before adding color to image Cast a ray from shading point to light source If shadow ray does not reach light, shading point is in shadow
111 Shadow Rays Check if shading point is in shadow before adding color to image Cast a ray from shading point to light source If shadow ray does not reach light, shading point is in shadow
112 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Acceleration Structure Image
113 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer
114 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Shadow Ray Buffer
115 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Shadow Ray Buffer Intersection Buffer
116 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
117 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
118 Shadow Rays versus Primary Rays
119 Shadow Rays versus Primary Rays Maximum intersection distance Maximum Distance
120 Shadow Rays versus Primary Rays Maximum intersection distance Don t need triangle index or barycentric coordinates Maximum Distance
121 Shadow Rays versus Primary Rays Maximum intersection distance Don t need triangle index or barycentric coordinates Maximum Distance Propagate color from shading kernel to final kernel
122 Customizing the Ray Struct Ray type is configurable struct Ray { packed_float3 origin; float mindistance; packed_float3 direction; float maxdistance; float3 color; };
123 Customizing the Ray Struct Ray type is configurable struct Ray { packed_float3 origin; Choose what data is provided to the intersector float mindistance; packed_float3 direction; float maxdistance; float3 color; };
124 Customizing the Ray Struct Ray type is configurable struct Ray { packed_float3 origin; Choose what data is provided to the intersector float mindistance; packed_float3 direction; Append app-specific data float maxdistance; float3 color; };
125 Customizing the Ray Struct Ray type is configurable struct Ray { packed_float3 origin; Choose what data is provided to the intersector float mindistance; packed_float3 direction; Append app-specific data float maxdistance; float3 color; }; Configure MPSRayIntersector for new Ray struct type: intersector.raydatatype =.originmindistancedirectionmaxdistance intersector.raystride = MemoryLayout<Ray>.stride
126 Customizing the Ray Struct Ray type is configurable struct Ray { packed_float3 origin; Choose what data is provided to the intersector float mindistance; packed_float3 direction; Append app-specific data float maxdistance; float3 color; }; Configure MPSRayIntersector for new Ray struct type: intersector.raydatatype =.originmindistancedirectionmaxdistance intersector.raystride = MemoryLayout<Ray>.stride
127 Customizing the Ray Struct Ray type is configurable struct Ray { packed_float3 origin; Choose what data is provided to the intersector float mindistance; packed_float3 direction; Append app-specific data float maxdistance; float3 color; }; Configure MPSRayIntersector for new Ray struct type: intersector.raydatatype =.originmindistancedirectionmaxdistance intersector.raystride = MemoryLayout<Ray>.stride
128 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
129 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
130 Finding Shadow Ray Intersections Modify call to MPSRayIntersector: intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
131 Finding Shadow Ray Intersections Modify call to MPSRayIntersector: intersector.intersectiondatatype =.distance intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
132 Finding Shadow Ray Intersections Modify call to MPSRayIntersector: intersector.intersectiondatatype =.distance intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
133 Finding Shadow Ray Intersections Modify call to MPSRayIntersector: intersector.intersectiondatatype =.distance intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.nearest, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
134 Finding Shadow Ray Intersections Modify call to MPSRayIntersector: intersector.intersectiondatatype =.distance intersector.encodeintersection(commandbuffer: commandbuffer, intersectiontype:.any, raybuffer: raybuffer, raybufferoffset: 0, intersectionbuffer: intersectionbuffer, intersectionbufferoffset: 0, raycount: raycount, accelerationstructure: accelerationstructure)
135 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
136 Shadow Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
137 Adding Ray Color to the Image Shadow Ray Buffer Intersection Buffer
138 Adding Ray Color to the Image Shadow Ray struct Ray { packed_float3 origin; float mindistance; packed_float3 direction; float maxdistance; Buffer float3 color; }; struct ShadowIntersection { }; float distance; Intersection Buffer
139 Adding Ray Color to the Image struct Ray { packed_float3 origin; float mindistance; packed_float3 direction; Positive float maxdistance; Shadow Ray Buffer float3 color; Yes }; struct ShadowIntersection { In Shadow float distance; }; Intersection Buffer
140 Adding Ray Color to the Image struct Ray { packed_float3 origin; Shadow Ray float mindistance; packed_float3 direction; float maxdistance; Positive No Not in Shadow, Add Color to Image Buffer float3 color; Yes }; struct ShadowIntersection { In Shadow float distance; }; Intersection Buffer
141 Adding Ray Color to the Image struct Ray { packed_float3 origin; Shadow Ray float mindistance; packed_float3 direction; float maxdistance; Positive No Not in Shadow, Add Color to Image Buffer float3 color; Yes }; struct ShadowIntersection { In Shadow Image float distance; }; Intersection Buffer
142
143
144 Primary Rays and Shading Shadow Rays Secondary Rays
145 Primary Rays and Shading Shadow Rays Secondary Rays
146 Secondary Rays Simulate light bouncing around the scene
147 Secondary Rays Simulate light bouncing around the scene Iterate, continuing in random direction at each step
148 Secondary Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
149 Secondary Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
150 Secondary Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
151 Secondary Rays Generate Primary Rays Intersector Shading Ray Buffer Intersection Buffer Intersector Add Color to Image Shadow Ray Buffer Intersection Buffer Image
152 Updating Secondary Rays Update secondary rays during each iteration: ray.origin = intersectionpoint; ray.direction = getrandomdirection(surfacenormal); ray.color *= surfacecolor;
153 Updating Secondary Rays Update secondary rays during each iteration: ray.origin = intersectionpoint; ray.direction = getrandomdirection(surfacenormal); ray.color *= surfacecolor;
154 Updating Secondary Rays Update secondary rays during each iteration: ray.origin = intersectionpoint; ray.direction = getrandomdirection(surfacenormal); ray.color *= surfacecolor;
155 Updating Secondary Rays Update secondary rays during each iteration: ray.origin = intersectionpoint; ray.direction = getrandomdirection(surfacenormal); ray.color *= surfacecolor;
156
157
158 Primary Rays and Shading Shadow Rays Secondary Rays
159 Primary Rays and Shading Shadow Rays Secondary Rays
160 Demo
161 Sample Code This app is available as a sample Add your own geometry, light sources, camera model, shading model Refer to documentation for more information Cornell Box 2009 Morgan McGuire, Ray traced with Metal,
162 Extending to Multiple GPUs Wayne Lister, GPU Software Engineer
163 Multi-GPU Ray Tracing Split work across GPUs
164 Multi-GPU Ray Tracing Split work across GPUs Copy data between GPUs
165 Multi-GPU Ray Tracing Split work across GPUs Copy data between GPUs Synchronize execution
166 Splitting Work Across GPUs Rendering
167 Splitting Work Across GPUs GPU 0 GPU 1 GPU 2 Rendering
168 Splitting Work Across GPUs GPU 0 GPU 1 GPU 2 Rendering Composition
169 Splitting Work Across GPUs Acceleration GPU 0 Structure Vertex Buffer GPU 1 GPU 2 Scene Data Rendering Composition
170 Splitting Work Across GPUs Acceleration Acceleration Structure Acceleration Structure Structure GPU 0 Vertex Buffer Vertex Buffer Vertex Buffer GPU 1 GPU 2 Scene Data Rendering Composition
171 Splitting Work Across GPUs Acceleration Acceleration Structure Acceleration Structure Structure GPU 0 Vertex Buffer Vertex Buffer Vertex Buffer GPU 1 GPU 2 Scene Data Rendering Composition
172 Copying Scene Data let copy = accelerationstructure.copy(with: nil, device: newdevice) copy.vertexbuffer = copybuffer(accelerationstructure.vertexbuffer, device: newdevice) Acceleration Structure Vertex Buffer GPU 0 GPU 1
173 Copying Scene Data let copy = accelerationstructure.copy(with: nil, device: newdevice) copy.vertexbuffer = copybuffer(accelerationstructure.vertexbuffer, device: newdevice) Acceleration Structure Acceleration Structure Vertex Buffer GPU 0 GPU 1
174 Copying Scene Data let copy = accelerationstructure.copy(with: nil, device: newdevice) copy.vertexbuffer = copybuffer(accelerationstructure.vertexbuffer, device: newdevice) Acceleration Structure Acceleration Structure Vertex Buffer Vertex Buffer GPU 0 GPU 1
175 Splitting Work Across GPUs Acceleration Acceleration Structure Acceleration Structure Structure GPU 0 Vertex Buffer Vertex Buffer Vertex Buffer GPU 1 GPU 2 Scene Data Rendering Composition
176 Splitting Work Across GPUs Acceleration Acceleration Structure Acceleration Structure Structure GPU 0 Vertex Buffer Vertex Buffer Vertex Buffer GPU 1 GPU 2 Scene Data Rendering Composition
177 Splitting Work Across GPUs Acceleration Acceleration Structure Acceleration Structure Structure GPU 0 Vertex Buffer Vertex Buffer Vertex Buffer GPU 1 GPU 2 Scene Data Rendering Composition
178 Creating a Shared CPU Allocation Device A Device B MTLBuffer (Private) MTLBuffer (Private)
179 Creating a Shared CPU Allocation Device A Device B MTLBuffer (Private) CPU Allocation MTLBuffer (Private)
180 Creating a Shared CPU Allocation Device A Device B MTLBuffer (Private) CPU Allocation MTLBuffer (Private)
181 Creating a Shared CPU Allocation Device A Device A Device B Device B MTLBuffer MTLBuffer CPU MTLBuffer MTLBuffer (Private) (Shared) Allocation (Shared) (Private)
182 Creating a Shared CPU Allocation Device A Device A Device B Device B Blit Blit MTLBuffer MTLBuffer CPU MTLBuffer MTLBuffer (Private) (Shared) Allocation (Shared) (Private)
183 Creating a Shared CPU Allocation let buffera = devicea.makebuffer(length: bufferlength, options:.shared)! let bufferb = deviceb.makebuffer(bytesnocopy: buffera.contents(), length: buffera.length, options:.shared deallocator: nil)!
184 Creating a Shared CPU Allocation let buffera = devicea.makebuffer(length: bufferlength, options:.shared)! let bufferb = deviceb.makebuffer(bytesnocopy: buffera.contents(), length: buffera.length, options:.shared deallocator: nil)!
185 Creating a Shared CPU Allocation let buffera = devicea.makebuffer(length: bufferlength, options:.shared)! let bufferb = deviceb.makebuffer(bytesnocopy: buffera.contents(), length: buffera.length, options:.shared deallocator: nil)!
186 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
187 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
188 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
189 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
190 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
191 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
192 Synchronizing with Metal Events GPU A Render region Blit region to shared buffer GPU B Render region Blit region from shared buffer Execution Timeline
193 Synchronizing with Metal Events NEW GPU A Render region Blit region to shared buffer [commandbuffer encodewaitforevent:value] GPU B Render region Wait Blit region from shared buffer Execution Timeline
194 Synchronizing with Metal Events NEW [commandbuffer encodesignalevent:value] GPU A Render region Blit region to shared buffer [commandbuffer encodewaitforevent:value] GPU B Render region Wait Blit region from shared buffer Execution Timeline
195 Load Balancing GPUs can have different performance GPU 0 GPU 1 GPU 2 Fixed Partitions
196 Load Balancing GPUs can have different performance GPU 0 Some regions are more complex to render GPU 1 GPU 2 Fixed Partitions
197 Load Balancing Adjust region sizes to keep GPUs fully utilized GPU 0 GPU 1 GPU 2 Fixed Partitions
198 Load Balancing Adjust region sizes to keep GPUs fully utilized GPU 0 GPU 1 GPU 2 Adaptive Partitions
199 Timing GPU Work commandbuffer.addcompletedhandler { commandbuffer in } completiontime[commandbuffer] = mach_absolute_time() Duration to Measure Command Command Command Command Buffer 0 Buffer 1 Buffer 2 Buffer 3 Execution Timeline
200 Demo
201 Summary Accelerates ray/triangle intersection on the GPU
202 Summary Accelerates ray/triangle intersection on the GPU Optimized for macos and ios
203 Summary Accelerates ray/triangle intersection on the GPU Optimized for macos and ios Scales across multiple GPUs
204 More Information Metal for Ray Tracing Acceleration Lab Technology Lab 6 Thursday 12:00 PM
205
Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane
Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world
More informationWorking with Metal Overview
Graphics and Games #WWDC14 Working with Metal Overview Session 603 Jeremy Sandmel GPU Software 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission
More informationCOMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.
COMP 4801 Final Year Project Ray Tracing for Computer Graphics Final Project Report FYP 15014 by Runjing Liu Advised by Dr. L.Y. Wei 1 Abstract The goal of this project was to use ray tracing in a rendering
More informationEnhancing Traditional Rasterization Graphics with Ray Tracing. October 2015
Enhancing Traditional Rasterization Graphics with Ray Tracing October 2015 James Rumble Developer Technology Engineer, PowerVR Graphics Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using
More informationShadows. COMP 575/770 Spring 2013
Shadows COMP 575/770 Spring 2013 Shadows in Ray Tracing Shadows are important for realism Basic idea: figure out whether a point on an object is illuminated by a light source Easy for ray tracers Just
More informationEnhancing Traditional Rasterization Graphics with Ray Tracing. March 2015
Enhancing Traditional Rasterization Graphics with Ray Tracing March 2015 Introductions James Rumble Developer Technology Engineer Ray Tracing Support Justin DeCell Software Design Engineer Ray Tracing
More informationIntroducing Metal 2. Graphics and Games #WWDC17. Michal Valient, GPU Software Engineer Richard Schreyer, GPU Software Engineer
Session Graphics and Games #WWDC17 Introducing Metal 2 601 Michal Valient, GPU Software Engineer Richard Schreyer, GPU Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display
More informationPhotorealistic 3D Rendering for VW in Mobile Devices
Abstract University of Arkansas CSCE Department Advanced Virtual Worlds Spring 2013 Photorealistic 3D Rendering for VW in Mobile Devices Rafael Aroxa In the past few years, the demand for high performance
More informationMetal. GPU-accelerated advanced 3D graphics rendering and data-parallel computation. source rebelsmarket.com
Metal GPU-accelerated advanced 3D graphics rendering and data-parallel computation source rebelsmarket.com Maths The heart and foundation of computer graphics source wallpoper.com Metalmatics There are
More informationEnabling immersive gaming experiences Intro to Ray Tracing
Enabling immersive gaming experiences Intro to Ray Tracing Overview What is Ray Tracing? Why Ray Tracing? PowerVR Wizard Architecture Example Content Unity Hybrid Rendering Demonstration 3 What is Ray
More informationNVIDIA Case Studies:
NVIDIA Case Studies: OptiX & Image Space Photon Mapping David Luebke NVIDIA Research Beyond Programmable Shading 0 How Far Beyond? The continuum Beyond Programmable Shading Just programmable shading: DX,
More informationInterpolation using scanline algorithm
Interpolation using scanline algorithm Idea: Exploit knowledge about already computed color values. Traverse projected triangle top-down using scanline. Compute start and end color value of each pixel
More informationMetal for OpenGL Developers
#WWDC18 Metal for OpenGL Developers Dan Omachi, Metal Ecosystem Engineer Sukanya Sudugu, GPU Software Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationComputer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010
Computer Graphics 1 Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering 1 The 3D rendering pipeline (our version for this class) 3D models in model coordinates 3D models in world coordinates 2D Polygons
More informationWhat s New in Metal, Part 2
Graphics and Games #WWDC15 What s New in Metal, Part 2 Session 607 Dan Omachi GPU Software Frameworks Engineer Anna Tikhonova GPU Software Frameworks Engineer 2015 Apple Inc. All rights reserved. Redistribution
More information03 RENDERING PART TWO
03 RENDERING PART TWO WHAT WE HAVE SO FAR: GEOMETRY AFTER TRANSFORMATION AND SOME BASIC CLIPPING / CULLING TEXTURES AND MAPPING MATERIAL VISUALLY DISTINGUISHES 2 OBJECTS WITH IDENTICAL GEOMETRY FOR NOW,
More informationInput Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking
Input Nodes Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking The different Input nodes, where they can be found, what their outputs are. Surface Input When editing a surface,
More informationMach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.
Mach band effect The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. A B 320322: Graphics and Visualization 456 Mach band effect The Mach band effect
More informationPractical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014
Practical Techniques for Ray Tracing in Games Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014 What Ray Tracing is not! Myth: Ray Tracing is only for photorealistic
More informationWorking With Metal Advanced
Graphics and Games #WWDC14 Working With Metal Advanced Session 605 Gokhan Avkarogullari GPU Software Aaftab Munshi GPU Software Serhat Tekin GPU Software 2014 Apple Inc. All rights reserved. Redistribution
More informationFrom Art to Engine with Model I/O
Session Graphics and Games #WWDC17 From Art to Engine with Model I/O 610 Nick Porcino, Game Technologies Engineer Nicholas Blasingame, Game Technologies Engineer 2017 Apple Inc. All rights reserved. Redistribution
More informationReal-Time Universal Capture Facial Animation with GPU Skin Rendering
Real-Time Universal Capture Facial Animation with GPU Skin Rendering Meng Yang mengyang@seas.upenn.edu PROJECT ABSTRACT The project implements the real-time skin rendering algorithm presented in [1], and
More informationCS354R: Computer Game Technology
CS354R: Computer Game Technology Real-Time Global Illumination Fall 2018 Global Illumination Mirror s Edge (2008) 2 What is Global Illumination? Scene recreates feel of physically-based lighting models
More informationSung-Eui Yoon ( 윤성의 )
CS380: Computer Graphics Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand overall algorithm of recursive ray tracing Ray generations Intersection
More informationComputer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.
Computer Graphics Lecture 02 Graphics Pipeline Edirlei Soares de Lima What is the graphics pipeline? The Graphics Pipeline is a special software/hardware subsystem
More informationCS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18
CS 498 VR Lecture 18-4/4/18 go.illinois.edu/vrlect18 Review and Supplement for last lecture 1. What is aliasing? What is Screen Door Effect? 2. How image-order rendering works? 3. If there are several
More informationNext-Generation Graphics on Larrabee. Tim Foley Intel Corp
Next-Generation Graphics on Larrabee Tim Foley Intel Corp Motivation The killer app for GPGPU is graphics We ve seen Abstract models for parallel programming How those models map efficiently to Larrabee
More informationCS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside
CS230 : Computer Graphics Lecture 4 Tamar Shinar Computer Science & Engineering UC Riverside Shadows Shadows for each pixel do compute viewing ray if ( ray hits an object with t in [0, inf] ) then compute
More informationGetting fancy with texture mapping (Part 2) CS559 Spring Apr 2017
Getting fancy with texture mapping (Part 2) CS559 Spring 2017 6 Apr 2017 Review Skyboxes as backdrops Credits : Flipmode 3D Review Reflection maps Credits : NVidia Review Decal textures Credits : andreucabre.com
More informationNVIDIA RTX: Enabling Ray Tracing in Vulkan. Nuno Subtil, Sr. Devtech Engineer / Eric Werness, Sr. System Software Engineer March 27, 2018
NVIDIA RTX: Enabling Ray Tracing in Vulkan Nuno Subtil, Sr. Devtech Engineer / Eric Werness, Sr. System Software Engineer March 27, 2018 Ray tracing vs. rasterization Overview How did we get here? Real-time
More informationRadeon ProRender and Radeon Rays in a Gaming Rendering Workflow. Takahiro Harada, AMD 2017/3
Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow Takahiro Harada, AMD 2017/3 Agenda Introduction Radeon ProRender & Radeon Rays Radeon Rays Unity + Radeon Rays Integration to real time applications
More informationTopic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping
Topic 12: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures
More informationTSBK03 Screen-Space Ambient Occlusion
TSBK03 Screen-Space Ambient Occlusion Joakim Gebart, Jimmy Liikala December 15, 2013 Contents 1 Abstract 1 2 History 2 2.1 Crysis method..................................... 2 3 Chosen method 2 3.1 Algorithm
More informationAbout Phoenix FD PLUGIN FOR 3DS MAX AND MAYA. SIMULATING AND RENDERING BOTH LIQUIDS AND FIRE/SMOKE. USED IN MOVIES, GAMES AND COMMERCIALS.
About Phoenix FD PLUGIN FOR 3DS MAX AND MAYA. SIMULATING AND RENDERING BOTH LIQUIDS AND FIRE/SMOKE. USED IN MOVIES, GAMES AND COMMERCIALS. Phoenix FD core SIMULATION & RENDERING. SIMULATION CORE - GRID-BASED
More informationGame Graphics & Real-time Rendering
Game Graphics & Real-time Rendering CMPM 163, W2018 Prof. Angus Forbes (instructor) angus@ucsc.edu Lucas Ferreira (TA) lferreira@ucsc.edu creativecoding.soe.ucsc.edu/courses/cmpm163 github.com/creativecodinglab
More informationAgenda. Ray(tracing(algorithm( Code(structure( Ray(intersec;ons Sphere Triangle Hints Transforma;ons Debugging How(to(start
Magdalena(Schwarzl 1 Agenda Ray(tracing(algorithm( Code(structure( Ray(intersec;ons Sphere Triangle Hints Transforma;ons Debugging How(to(start Magdalena(Schwarzl 2 Basic algortihm For each pixel: 1. Construct
More informationSceneKit: What s New Session 604
Graphics and Games #WWDC17 SceneKit: What s New Session 604 Thomas Goossens, SceneKit engineer Amaury Balliet, SceneKit engineer Anatole Duprat, SceneKit engineer Sébastien Métrot, SceneKit engineer 2017
More informationTopic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized
Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures
More informationThe Graphics Pipeline
The Graphics Pipeline Ray Tracing: Why Slow? Basic ray tracing: 1 ray/pixel Ray Tracing: Why Slow? Basic ray tracing: 1 ray/pixel But you really want shadows, reflections, global illumination, antialiasing
More informationCSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015
CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 2 due tomorrow at 2pm Grading window
More informationTopic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural
Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Topic 11: Photographs Texture Mapping Motivation Sources of texture Texture coordinates
More informationApplications of Explicit Early-Z Culling
Applications of Explicit Early-Z Culling Jason L. Mitchell ATI Research Pedro V. Sander ATI Research Introduction In past years, in the SIGGRAPH Real-Time Shading course, we have covered the details of
More informationThe Application Stage. The Game Loop, Resource Management and Renderer Design
1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data
More informationCS 4620 Midterm, March 21, 2017
CS 460 Midterm, March 1, 017 This 90-minute exam has 4 questions worth a total of 100 points. Use the back of the pages if you need more space. Academic Integrity is expected of all students of Cornell
More informationOctree-Based Sparse Voxelization for Real-Time Global Illumination. Cyril Crassin NVIDIA Research
Octree-Based Sparse Voxelization for Real-Time Global Illumination Cyril Crassin NVIDIA Research Voxel representations Crane et al. (NVIDIA) 2007 Allard et al. 2010 Christensen and Batali (Pixar) 2004
More informationRay Tracing. Computer Graphics CMU /15-662, Fall 2016
Ray Tracing Computer Graphics CMU 15-462/15-662, Fall 2016 Primitive-partitioning vs. space-partitioning acceleration structures Primitive partitioning (bounding volume hierarchy): partitions node s primitives
More informationDEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/
DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/2013-11-04 DEFERRED RENDERING? CONTENTS 1. The traditional approach: Forward rendering 2. Deferred rendering (DR) overview 3. Example uses of DR:
More informationRay tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1
Ray tracing Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 3/19/07 1 From last time Hidden surface removal Painter s algorithm Clipping algorithms Area subdivision BSP trees Z-Buffer
More information6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed
6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, 2003 2:40-4pm One hand-written sheet of notes allowed Name: 1 2 3 4 5 6 7 / 4 / 15 / 5 / 5 / 12 / 2 / 7 Total / 50 1 Animation [ /4]
More informationGPGPU Applications. for Hydrological and Atmospheric Simulations. and Visualizations on the Web. Ibrahim Demir
GPGPU Applications for Hydrological and Atmospheric Simulations and Visualizations on the Web Ibrahim Demir Big Data We are collecting and generating data on a petabyte scale (1Pb = 1,000 Tb = 1M Gb) Data
More informationINFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!
INFOGR Computer Graphics J. Bikker - April-July 2015 - Lecture 10: Ground Truth Welcome! Today s Agenda: Limitations of Whitted-style Ray Tracing Monte Carlo Path Tracing INFOGR Lecture 10 Ground Truth
More informationRendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015
Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015 What is rendering? Generating an image from a 3D scene model Ingredients Representation of 3D geometry Specification for camera & lights
More informationCS4620/5620: Lecture 14 Pipeline
CS4620/5620: Lecture 14 Pipeline 1 Rasterizing triangles Summary 1! evaluation of linear functions on pixel grid 2! functions defined by parameter values at vertices 3! using extra parameters to determine
More informationComputer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura
Computer Graphics Lecture 13 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local
More informationIntegrating Apps and Content with AR Quick Look
Session #WWDC18 Integrating Apps and Content with AR Quick Look 603 David Lui, ARKit Engineering Dave Addey, ARKit Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not
More informationReal - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský
Real - Time Rendering Pipeline optimization Michal Červeňanský Juraj Starinský Motivation Resolution 1600x1200, at 60 fps Hw power not enough Acceleration is still necessary 3.3.2010 2 Overview Application
More informationVoxel Cone Tracing and Sparse Voxel Octree for Real-time Global Illumination. Cyril Crassin NVIDIA Research
Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global Illumination Cyril Crassin NVIDIA Research Global Illumination Indirect effects Important for realistic image synthesis Direct lighting Direct+Indirect
More informationCS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 17) Read (required): GLSL book, chapter 4 (The OpenGL Programmable
More informationCS451Real-time Rendering Pipeline
1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does
More informationApplications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research
Applications of Explicit Early-Z Z Culling Jason Mitchell ATI Research Outline Architecture Hardware depth culling Applications Volume Ray Casting Skin Shading Fluid Flow Deferred Shading Early-Z In past
More informationCMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker
CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection
More informationDirect Rendering of Trimmed NURBS Surfaces
Direct Rendering of Trimmed NURBS Surfaces Hardware Graphics Pipeline 2/ 81 Hardware Graphics Pipeline GPU Video Memory CPU Vertex Processor Raster Unit Fragment Processor Render Target Screen Extended
More informationRecollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows
Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface
More informationGraphics Hardware. Instructor Stephen J. Guy
Instructor Stephen J. Guy Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability! Programming Examples Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability!
More informationMe Again! Peter Chapman. if it s important / time-sensitive
Me Again! Peter Chapman P.Chapman1@bradford.ac.uk pchapman86@gmail.com if it s important / time-sensitive Issues? Working on something specific? Need some direction? Don t hesitate to get in touch http://peter-chapman.co.uk/teaching
More informationRay Casting on Programmable Graphics Hardware. Martin Kraus PURPL group, Purdue University
Ray Casting on Programmable Graphics Hardware Martin Kraus PURPL group, Purdue University Overview Parallel volume rendering with a single GPU Implementing ray casting for a GPU Basics Optimizations Published
More informationReal-Time Non- Photorealistic Rendering
Real-Time Non- Photorealistic Rendering Presented by: Qing Hu LIAO SOCS, McGill Feb 1, 2005 Index Introduction Motivation Appel s Algorithm Improving Schema Rendering Result Economy of line A great deal
More informationRay Casting of Trimmed NURBS Surfaces on the GPU
Ray Casting of Trimmed NURBS Surfaces on the GPU Hans-Friedrich Pabst Jan P. Springer André Schollmeyer Robert Lenhardt Christian Lessig Bernd Fröhlich Bauhaus University Weimar Faculty of Media Virtual
More informationTDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)
TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) Saturday, January 13 th, 2018, 08:30-12:30 Examiner Ulf Assarsson, tel. 031-772 1775 Permitted Technical Aids None, except
More informationAdvanced Shading I: Shadow Rasterization Techniques
Advanced Shading I: Shadow Rasterization Techniques Shadow Terminology umbra: light totally blocked penumbra: light partially blocked occluder: object blocking light Shadow Terminology umbra: light totally
More informationPhotorealism: Ray Tracing
Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any
More informationCIS 581 Interactive Computer Graphics
CIS 581 Interactive Computer Graphics Instructor: Han-Wei Shen (hwshen@cse.ohio-state.edu) Credit: 4 Class: MWF 2:30 pm 3:18 pm DL 264 Office hours: TuTr 11 am - 12pm DL 789 Web: http://www.cse.ohio-state.edu/~hwshen/581
More informationBuilding Visually Rich User Experiences
Session App Frameworks #WWDC17 Building Visually Rich User Experiences 235 Noah Witherspoon, Software Engineer Warren Moore, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public
More informationINTRODUCTION TO OPTIX. Martin Stich, Engineering Manager
INTRODUCTION TO OPTIX Martin Stich, Engineering Manager OptiX Basics AGENDA Advanced Topics Case Studies Feature Outlook 2 OPTIX BASICS 3 IN A NUTSHELL The OptiX Ray Tracing SDK State-of-the-art performance:
More informationCS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017
CS354 Computer Graphics Ray Tracing Qixing Huang Januray 24th 2017 Graphics Pipeline Elements of rendering Object Light Material Camera Geometric optics Modern theories of light treat it as both a wave
More informationWindowing System on a 3D Pipeline. February 2005
Windowing System on a 3D Pipeline February 2005 Agenda 1.Overview of the 3D pipeline 2.NVIDIA software overview 3.Strengths and challenges with using the 3D pipeline GeForce 6800 220M Transistors April
More informationThe Traditional Graphics Pipeline
Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics
More informationMulti-View Soft Shadows. Louis Bavoil
Multi-View Soft Shadows Louis Bavoil lbavoil@nvidia.com Document Change History Version Date Responsible Reason for Change 1.0 March 16, 2011 Louis Bavoil Initial release Overview The Multi-View Soft Shadows
More informationReal-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!
Last Time? Real-Time Shadows Perspective-Correct Interpolation Texture Coordinates Procedural Solid Textures Other Mapping Bump Displacement Environment Lighting Textures can Alias Aliasing is the under-sampling
More informationCSE 167: Lecture #17: Volume Rendering. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012
CSE 167: Introduction to Computer Graphics Lecture #17: Volume Rendering Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Thursday, Dec 13: Final project presentations
More informationComputer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15
Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local
More informationFinal Project: Real-Time Global Illumination with Radiance Regression Functions
Volume xx (200y), Number z, pp. 1 5 Final Project: Real-Time Global Illumination with Radiance Regression Functions Fu-Jun Luan Abstract This is a report for machine learning final project, which combines
More informationParticle systems, collision detection, and ray tracing. Computer Graphics CSE 167 Lecture 17
Particle systems, collision detection, and ray tracing Computer Graphics CSE 167 Lecture 17 CSE 167: Computer graphics Particle systems Collision detection Ray tracing CSE 167, Winter 2018 2 Particle systems
More informationFor Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.
Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization
More informationInteractive Methods in Scientific Visualization
Interactive Methods in Scientific Visualization GPU Volume Raycasting Christof Rezk-Salama University of Siegen, Germany Volume Rendering in a Nutshell Image Plane Eye Data Set Back-to-front iteration
More informationINFOGR Computer Graphics
INFOGR Computer Graphics Jacco Bikker & Debabrata Panja - April-July 2018 Lecture 4: Graphics Fundamentals Welcome! Today s Agenda: Rasters Colors Ray Tracing Assignment P2 INFOGR Lecture 4 Graphics Fundamentals
More informationARM Multimedia IP: working together to drive down system power and bandwidth
ARM Multimedia IP: working together to drive down system power and bandwidth Speaker: Robert Kong ARM China FAE Author: Sean Ellis ARM Architect 1 Agenda System power overview Bandwidth, bandwidth, bandwidth!
More informationChapter 7 - Light, Materials, Appearance
Chapter 7 - Light, Materials, Appearance Types of light in nature and in CG Shadows Using lights in CG Illumination models Textures and maps Procedural surface descriptions Literature: E. Angel/D. Shreiner,
More informationCS GAME PROGRAMMING Question bank
CS6006 - GAME PROGRAMMING Question bank Part A Unit I 1. List the different types of coordinate systems. 2. What is ray tracing? Mention some applications of ray tracing. 3. Discuss the stages involved
More informationComputer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)
Computer Graphics Lecture 14 Bump-mapping, Global Illumination (1) Today - Bump mapping - Displacement mapping - Global Illumination Radiosity Bump Mapping - A method to increase the realism of 3D objects
More informationHardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences
Hardware Accelerated Volume Visualization Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences A Real-Time VR System Real-Time: 25-30 frames per second 4D visualization: real time input of
More informationRasterization Overview
Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer
More informationV-Ray RT: A New Paradigm in Photorealistic Raytraced Rendering on NVIDIA GPUs. Vladimir Koylazov Chaos Software.
V-Ray RT: A New Paradigm in Photorealistic Raytraced Rendering on NVIDIA s Vladimir Koylazov Chaos Software V-Ray RT demonstration V-Ray RT demonstration V-Ray RT architecture overview Goals of V-Ray RT
More informationGPU Ray Tracing at the Desktop and in the Cloud. Phillip Miller, NVIDIA Ludwig von Reiche, mental images
GPU Ray Tracing at the Desktop and in the Cloud Phillip Miller, NVIDIA Ludwig von Reiche, mental images Ray Tracing has always had an appeal Ray Tracing Prediction The future of interactive graphics is
More informationConsider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye
Ray Tracing What was the rendering equation? Motivate & list the terms. Relate the rendering equation to forward ray tracing. Why is forward ray tracing not good for image formation? What is the difference
More informationIntro to Ray-Tracing & Ray-Surface Acceleration
Lecture 12 & 13: Intro to Ray-Tracing & Ray-Surface Acceleration Computer Graphics and Imaging UC Berkeley Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric
More informationPipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11
Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION
More informationOverview: Ray Tracing & The Perspective Projection Pipeline
Overview: Ray Tracing & The Perspective Projection Pipeline Lecture #2 Thursday, August 28 2014 About this Lecture! This is an overview.! Think of it as a quick tour moving fast.! Some parts, e.g. math,
More informationSUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling
CS380: Introduction to Computer Graphics Ray tracing Chapter 20 Min H. Kim KAIST School of Computing Modeling SUMMARY 2 1 Types of coordinate function Explicit function: Line example: Implicit function:
More informationA free open source modelling/rendering software
A free open source modelling/rendering software Rendering In short, rendering is the process of generating an image from a model or set of models in a scene file. Different styles ie. Photorealistic(Cycles),
More information