What are you working on? V4 (HTML ISN'T PROGRAMMING)
2,003 replies, posted
Nullsquared was offended because he felt he was being talked down to.
Catbadh over-explained something, but meant no harm by it.
I suggest we digest these facts personally and stop arguing over them.
[QUOTE=databee;18267418]Saying you're writing a paper on the math of raytracers isn't really helpful to me.[/quote]
Neither is any of the shit that anyone else posts in here. Its their own personal projects.
[quote]Someone pointing out a error in your raytracer is helpful to you.[/QUOTE]
Like I said.
"I think your reflection is wrong, is there any attenuation going on?" = good
"Your reflection is wrong, there's no attenuation." = also good
"Your reflection isn't quite correct, (paragraph of explanation as if I'm some kind of newbie)" = bad
[QUOTE=ryandaniels;18267432]Nullsquared was offended because he felt he was being talked down to.
Catbadh over-explained something, but meant no harm by it.
I suggest we digest these facts personally and stop arguing over them.[/QUOTE]
We're going to need a lot of fiber. :/
[QUOTE=nullsquared;18267467]Neither is any of the shit that anyone else posts in here. Its their own personal projects.[/QUOTE]
[QUOTE=nullsquared;18267324]What are you working on? V4 ( [b]NULLSQUARED AND OTHERS POST USEFUL CONTENT[/b], IDIOTS ARGUE WITH NULL EVERY TIME HE POSTS SOMETHING)[/QUOTE]
Kinda walked right into that one.
[QUOTE=Senney;18267226]What are you working on? V4 (DONT ACTUALLY POST WHAT YOU'RE WORKING ON JUST ARGUE)[/QUOTE]
more like
What are you working on? V4 (DONT ACTUALLY POST ANYTHING BECAUSE NOBODY CARES WHAT YOU ARE WORKING ON, THEY JUST ENTERED THE THREAD TO ENTER IT) - gangbang
[QUOTE=databee;18267515]Kinda walked right into that one.[/QUOTE]
Clearly running out of actual stuff to argue about.
I always get excited when I see there's a bunch of new posts in this thread but it's disappointing to see that almost all the new posts are crap...
But it's good you guys are thinking of a new threadtitle, I'm starting to see V5 at the horizon.
[QUOTE=nullsquared;18267587]Clearly running out of actual stuff to argue about.[/QUOTE]
Just trying to point out how arrogant you are. Everyone already knows this so I may aswell leave it.
[editline]09:54PM[/editline]
Thread needs more 5 minute raytracers.
[QUOTE=databee;18267638]Just trying to point out how arrogant you are. Everyone already knows this so I may aswell leave it.[/QUOTE]
So I used the wrong word, how is that arrogance you dolt?
[QUOTE=nullsquared;18267665]So I used the wrong word, how is that arrogance you dolt?[/QUOTE]
What?
Shouldn't you be arguing with someone who gives you advice?
[QUOTE=nullsquared;18267665]So I used the wrong word, how is that arrogance you dolt?[/QUOTE]
you are from new york why are you using the word dolt
I'm glad we saved this for the conclusion of V4, instead of the introduction to V5...
[QUOTE=nullsquared;18267403]What's your point? Pretty much everything in graphics breaks real-life rules. And like I said, if I was shooting for realism, I wouldn't be writing a ray tracer, I'd be writing a path tracer or photon tracer. Your argument is completely useless considering that I specifically said the reflection coefficient is 1 (OMG BREAKING REAL-LIFE RULES, NOOOO)[/QUOTE]
It's not like this is super-special voodoo math. Ray tracers are supposed to approximate real-life, are they not? I'm just saying that the coefficients for the diffuse, specular, and reflective energy components need to sum to [I]at most[/I] 1.
[QUOTE=jA_cOp;18267794]I'm glad we saved this for the conclusion of V4, instead of the introduction to V5...[/QUOTE]
gotta go out with a bang brotha
Stop with the stupid arguments, you're all just making yourself look stupid(er).
I coded a D3D renderer for GWEN. There's nothing impressive to show because it looks exactly the same as the Botch renderer and the GDI+ renderer. But maybe that IS the cool thing.
[img]http://img694.imageshack.us/img694/3319/direct3dsample200911082.png[/img]
The harsh gradient on the tabs makes the text on top of it look a bit off.
[QUOTE=garry;18267928]Stop with the stupid arguments, you're all just making yourself look stupid(er).
I coded a D3D renderer for GWEN. There's nothing impressive to show because it looks exactly the same as the Botch renderer and the GDI+ renderer. But maybe that IS the cool thing.
[img]http://img694.imageshack.us/img694/3319/direct3dsample200911082.png[/img][/QUOTE]
How are you loading and rendering the custom font? Comic sans always looks like treason, but the antialiasing on that could be a lot better. I'm partial to using Freetype myself.
[QUOTE=Cathbadh;18267813]It's not like this is super-special voodoo math. Ray tracers are supposed to approximate real-life, are they not? I'm just saying that the coefficients for the diffuse, specular, and reflective energy components need to sum to [I]at most[/I] 1.[/QUOTE]
No they don't. That's what high dynamic range rendering is for.
[editline]05:22PM[/editline]
Garry, what does Gwen do in terms of rendering optimizations?
Not really programing related but it's not thread worthy and I don't know of any better thread to ask this so;
Have you ever noticed when walking a in a real big room, like a lobby in a fancy building or something, and gotten that feeling of space? Like you really just feel how immense the room is. Well I have, and this promtped me to realize that games don't have this. Games always feel boxed in, like you are a giant proportionally.
So my question is, is this a product of 1)insufficient screen size/ width, 2) improper perspective, 3) no binary depth perception, or 4) improper scale?
[QUOTE=ryandaniels;18268500]Not really programing related but it's not thread worthy and I don't know of any better thread to ask this so;
Have you ever noticed when walking a in a real big room, like a lobby in a fancy building or something, and gotten that feeling of space? Like you really just feel how immense the room is. Well I have, and this promtped me to realize that games don't have this. Games always feel boxed in, like you are a giant proportionally.
So my question is, is this a product of 1)insufficient screen size/ width, 2) improper perspective, 3) no binary depth perception, or 4) improper scale?[/QUOTE]
It's problably a combination of all 4, Since monitors don't really allow for depth perception, and the scale of some games are just so far off it's silly
[QUOTE=nullsquared;18268267]Garry, what does Gwen do in terms of rendering optimizations?[/QUOTE]
Nothing right now, it's left up to the renderer (and eventual implementation).
It does let you detect when it needs a redraw, so you can have it rendered to a texture and only redraw it when you need to, for example.
[QUOTE=garry;18268698]
It does let you detect when it needs a redraw, so you can have it rendered to a texture and only redraw it when you need to, for example.[/QUOTE]
Oh, ok. How would batching optimizations be done? Naive rendering would mean that every GUI widget would be at least 9 batches (8 corners and center piece), so I'm curious how this would be optimized if its left entirely up to the renderer.
[QUOTE=Cathbadh;18268128]How are you loading and rendering the custom font? Comic sans always looks like treason, but the antialiasing on that could be a lot better. I'm partial to using Freetype myself.[/QUOTE]
Using D3DX, it doesn't have any filtering enabled
[editline]10:48PM[/editline]
[QUOTE=nullsquared;18268773]Oh, ok. How would batching optimizations be done? Naive rendering would mean that every GUI widget would be at least 9 batches (8 corners and center piece), so I'm curious how this would be optimized if its left entirely up to the renderer.[/QUOTE]
Every panel has renderdata, which is just a void* - the renderer can use this pointer to store any renderer specific data it wants about the panel.
Although I don't really believe that drawing 9 quads per panel is that big of a deal - and would always be more in favour of caching pixel data rather than geometry.
[editline]10:51PM[/editline]
FYI, here's the code to the D3D renderer so far
[cpp]namespace Gwen
{
namespace Renderer
{
DirectX9::DirectX9( IDirect3DDevice9* pDevice )
{
m_pDevice = pDevice;
m_iVertNum = 0;
for ( int i=0; i<MaxVerts; i++ )
{
m_pVerts[ i ].z = 0.5f;
m_pVerts[ i ].rhw = 1.0f;
}
}
DirectX9::~DirectX9()
{
}
void DirectX9::Begin()
{
m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
m_pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );
m_pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
}
void DirectX9::End()
{
Flush();
}
void DirectX9::DrawLine( int x, int y, int a, int b )
{
}
void DirectX9::Flush()
{
if ( m_iVertNum > 0 )
{
m_pDevice->SetFVF( D3DFVF_VERTEXFORMAT2D );
m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLELIST, m_iVertNum/3, &m_pVerts[0], sizeof(VERTEXFORMAT2D) );
m_iVertNum = 0;
}
}
void DirectX9::AddVert( int x, int y )
{
if ( m_iVertNum >= MaxVerts-1 )
{
Flush();
}
m_pVerts[ m_iVertNum ].x = (float)x;
m_pVerts[ m_iVertNum ].y = (float)y;
m_pVerts[ m_iVertNum ].color = m_Color;
m_iVertNum++;
}
void DirectX9::DrawFilledRect( Gwen::Rect rect )
{
Translate( rect );
AddVert( rect.x, rect.y );
AddVert( rect.x+rect.w, rect.y );
AddVert( rect.x, rect.y + rect.h );
AddVert( rect.x+rect.w, rect.y );
AddVert( rect.x+rect.w, rect.y+rect.h );
AddVert( rect.x, rect.y + rect.h );
}
void DirectX9::SetDrawColor(Gwen::Color color)
{
m_Color = D3DCOLOR_ARGB( color.a, color.r, color.g, color.b );
}
void DirectX9::LoadFont( Gwen::Font* font )
{
// Scale the font according to canvas
font->realsize = font->size * Scale();
D3DXFONT_DESC fd;
memset( &fd, 0, sizeof(fd) );
wcscpy_s( fd.FaceName, LF_FACESIZE, font->facename.c_str() );
fd.Width = 0;
fd.MipLevels = 1;
fd.CharSet = DEFAULT_CHARSET;
fd.Height = font->realsize * -1.0f;
fd.OutputPrecision = OUT_DEFAULT_PRECIS;
fd.Italic = 0;
fd.Weight = FW_NORMAL;
fd.Quality = 0;
fd.PitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
LPD3DXFONT pD3DXFont;
HRESULT hr = D3DXCreateFontIndirect( m_pDevice, &fd, &pD3DXFont );
font->data = pD3DXFont;
}
void DirectX9::FreeFont( Gwen::Font* pFont )
{
if ( !pFont->data ) return;
LPD3DXFONT pD3DXFont = (LPD3DXFONT) pFont->data;
pD3DXFont->Release();
pFont->data = NULL;
}
void DirectX9::RenderText( Gwen::Font* pFont, Gwen::Rect rect, const Gwen::UnicodeString& text )
{
Flush();
// If the font doesn't exist, or the font size should be changed
if ( !pFont->data || fabs( pFont->realsize - pFont->size * Scale() ) > 2 )
{
FreeFont( pFont );
LoadFont( pFont );
}
LPD3DXFONT pD3DXFont = (LPD3DXFONT) pFont->data;
Translate( rect );
RECT ClipRect = { rect.x, rect.y, rect.right(), rect.bottom() };
pD3DXFont->DrawTextW( NULL, text.c_str(), -1, &ClipRect, DT_WORDBREAK | DT_LEFT | DT_TOP, m_Color );
}
Gwen::Point DirectX9::MeasureText( Gwen::Font* pFont, const Gwen::UnicodeString& text, int iMaxWidth )
{
// If the font doesn't exist, or the font size should be changed
if ( !pFont->data || fabs( pFont->realsize - pFont->size * Scale() ) > 2 )
{
FreeFont( pFont );
LoadFont( pFont );
}
LPD3DXFONT pD3DXFont = (LPD3DXFONT) pFont->data;
Point size;
if ( text.empty() )
{
RECT rct = {0,0,0,0};
pD3DXFont->DrawTextW( NULL, L"W", -1, &rct, DT_CALCRECT, 0 );
return Gwen::Point( 0, rct.bottom );
}
RECT rct = {0,0,0,0};
if ( iMaxWidth > 0 )
{
rct.right = iMaxWidth;
}
pD3DXFont->DrawTextW( NULL, text.c_str(), -1, &rct, DT_CALCRECT | DT_WORDBREAK | DT_LEFT | DT_TOP, 0 );
return Point( rct.right + 1, rct.bottom + 1 );
}
void DirectX9::StartClip()
{
Flush();
m_pDevice->SetRenderState( D3DRS_SCISSORTESTENABLE, TRUE );
const Gwen::Rect& rect = ClipRegion();
RECT r;
r.left = rect.x * Scale();
r.right = rect.right() * Scale();
r.top = rect.y * Scale();
r.bottom = rect.bottom() * Scale();
m_pDevice->SetScissorRect( &r );
}
void DirectX9::EndClip()
{
Flush();
m_pDevice->SetRenderState( D3DRS_SCISSORTESTENABLE, FALSE );
}
void DirectX9::DrawTexturedRect( Gwen::Texture* pTexture, Gwen::Rect pTargetRect, float u1, float v1, float u2, float v2 )
{
}
void DirectX9::LoadTexture( Gwen::Texture* pTexture )
{
}
void DirectX9::FreeTexture( Gwen::Texture* pTexture )
{
}
}
}[/cpp]
That's all that's rendering the screenshot above.
[img]http://img697.imageshack.us/img697/144/darkx.png[/img]
Decided to whip up my own little ray tracer. Every material absorbs 110% of light, causing this really cool 'dark' effect.
[quote=mattz333;18268998]every material absorbs 110% of light.[/quote]
That's not realistic! You can't absorb 110% of light!
[QUOTE=jA_cOp;18266472]Who the fuck do you think you are dropping in like that, helping with the argument? Nobody asked for your damn opinion on this shit.[/QUOTE]
u mad?
[QUOTE=Mattz333;18268998][media]http://img697.imageshack.us/img697/144/darkx.png[/media]
Decided to whip up my own little ray tracer. Every material absorbs 110% of light, causing this really cool 'dark' effect.[/QUOTE]
That's almost photo quality!
Almost.
[QUOTE=gngbng;18269237]u mad?[/QUOTE]
u RILED?
[QUOTE=Xera;18269271]u RILED?[/QUOTE]
u furious?
[QUOTE=gngbng;18269309]u furious?[/QUOTE]
u irate?
Sorry, you need to Log In to post a reply to this thread.