3 ms·
I started writing one and got discouraged when per-pixel Phong shading on the teapot ran at like 10 FPS. A profiler showed me that I was bottlenecked by simple
by blt 13y ago
I started writing one and got discouraged when per-pixel Phong shading on the teapot ran at like 10 FPS. A profiler showed me that I was bottlenecked by simple unavoidable work like matrix multiplies in my shaders. Maybe that profiler was wrong though... now I want to hack on it some more.
- clarry 13y agoWhen was that, and what sort of hardware were you using? Here's a rather impressive software renderer that does per-pixel Phong shading and shadow mapping (among other things): http://users.softlab.ntua.gr/~ttsiod/renderer.html http://users.softlab.ntua.gr/~ttsiod/renderer.html You might also want to look into Ingo Wald's thesis on realtime ray tracing. In a ray tracing tutorial Jacco Bikker wrote that Wald is reporting speeds of several frames per second for scenes consisting of thousands of polygons at a resolution of 1024x768 pixels, on a single 2.5Ghz laptop. That was written ten years ago, in 2004.
- jheriko 13y agoi can hint at you that this is not an impossible problem even with a fairly decent res teapot :) p.s. why are you doing any matrix multiplies in a shader? i guess these are per-pixel? per-vert? even per-vert ones can be removed or reduced if you don't mind a little loss of generality and have e.g fixed view point or a non-rotating teapot ;) edit: as a note the teapot mesh is a bit squashed - this was originally such an optimisation. it was originally meant to be rendered rotating around the vertical axis on a 4:3 display, so the teapot mesh has been deformed 3:4 where 3 is the vertical and 4 are the two horizontal axes... this saves the aspect ratio correcting multiply when its rendered out.