Geometry Shaders for Irrlicht(development closed till later)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

this one is entirely made from scratch by me
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

we are unable to see any code, and the devs cant see if its possible to include without code.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

first of all i need to make the shader :) that runs at reasonable speeds

geometry shaders run serial, so i need to unroll every loop by hand :(
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Image

final result... I would say very close to dx11 (dx11 can make a lot more triangles :roll:, but i did this on dx10 hardware so no tesselation there ), lets hope the story repeats and openGL gets tessellation just like geometry shaders.

right now i'm writing the CPP
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Nice work, but You have to remember about performance. On DX11 tessellation in much faster than via Geometry Shader. Only problem are GeForce cards, because Tessellation is also avaiable on Radeon HD2xxx and up, so on DX10 hardware.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

how much faster??? (I hope openGL gets it soon, and i will get a fermi card and will implement it in irrlicht)
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

It should be orders of magnitude faster because it is a fixed-function part of the pipeline that is meant to do it. Geometry shaders really were never meant to do tessellation which is why I'm curious how fast your demonstration there runs and on what hardware?

And OpenGL will only receive hardware tessellation into its core specification sometime after both AMD and nVidia support it. Right now AMD is the only manufacturer to have it and they haven't released any recent extensions related to the new hardware tessellation unit for their GPUs.
Last edited by Halifax on Wed Jan 06, 2010 3:48 pm, edited 1 time in total.
TheQuestion = 2B || !2B
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

i love and hate triangle strip output type.

love:
because on tesselation level 1 i output 4 verts instead of 6
on level 2 i have 8 instead of 12

hate:
because on tesselation level 2 i output 2 useless triangles

but with some luck i can add another tesselation level.

that would make 64 triangles per big triangle

aaand i need to optimise texture reads

96 reads for 36 vertices

some are double reads... (same tcoord)

UPDATE:

Im super happy now.

I fixed my level 2 code. 4 triangles and 8 vertices

Even Better level 3 (8 triangles, originally 24 verts) 13 vertices
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

now i understand why the ATI/dx11 tesselation is honey comb shaped..

as my tesselation level 5 got (32 triangles) closer to 2n vertices per N triangles
their triangle strip must be a loop cut and therefore very efficient and must be close to the optimal n+2
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

HELP I NEED SOMEONE WITH "GLU" or something that is able to make triangle strips out of triangles.

basically i need this converted to triangle strips (can be more than one), but using less than 86 vertices.

this image shows what i want to have less than 86 verts

Image
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

and we are almost done....

Ladies and Gentlemen, I am proud to present....

IrRLiChT ExAmPLe O24.GeOMeTrYsHaDeRs (really openGL tesselation)

Image
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

ladies and gentlemen i am officially finished (at least for this realease)

http://project-ninja-star.googlecode.co ... rsGLSL.zip
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

devsh wrote:you people amaze me, I make anext gen addition to the engine and no one is interested?
"You people". haha. Tickle me pink.
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Image

what's the real advantage of this?
Dan911
Posts: 21
Joined: Tue Dec 16, 2008 11:28 pm

Post by Dan911 »

I think its kick-ass.. don't stop (BELIEVING!!!!!)

sorry..

had to do it..
Post Reply