Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

zacaj

Member Since 18 Sep 2008
Offline Last Active Yesterday, 03:57 PM
*****

#4994317 Trouble with Quaternion camera motion.

Posted by zacaj on 26 October 2012 - 07:00 PM

Instead of extracting the eulwr angles, I just create a rotation matrix from the quaternion, and then multiply it by vec3(0,0,-1) for forward, vec3(1,0,0) for right, etc


#4987433 Questions about Intel Sample

Posted by zacaj on 06 October 2012 - 10:37 AM

The << is a bitshift.  It shifts the number (1 in this case) left ten bits, which is the equivilant of multiplying 1 by 2^10.  2^10=1024, 1024*1=1024


#4987271 Software Renderers?

Posted by zacaj on 05 October 2012 - 04:08 PM

Here's a few renderers I've got sitting around.  One came from an old book I have, the other two I coded years ago.  The code isn't very pretty, but maybe they can help you out a bit.  I recently coded a much nicer renderer, but it's a module in my main engine, so if I uploaded just the renderer parts you wouldn't be able to compile it, but I could still upload them if you want...

http://zacaj.com/renderers.zip


#4981088 Particles on the GPU

Posted by zacaj on 17 September 2012 - 06:59 PM

As long as your particles are just quads it will be much easier (and more efficient) to use point sprites.  I'd suggest you look into them before you go diving into geometry shaders


#4981083 Particles on the GPU

Posted by zacaj on 17 September 2012 - 06:53 PM

What GL version you targeting?


#4981080 Particles on the GPU

Posted by zacaj on 17 September 2012 - 06:50 PM

Should be doable then :)  Is the game 3D or 2D?


#4981076 Particles on the GPU

Posted by zacaj on 17 September 2012 - 06:42 PM

A Geometry shader can create polygons on the GPU.  The most important question, however, is do you need the particles to collide with the level geometry?  (if so you'd need to have the entire physics level on the gpu etc and I don't think it would be worth it.  If your particles just follow some mathmatic trajectory (say they just have position, velocity, and acceleration) then you could just pass those to the GPU once and let the GPU integrate the new position each frame quite easily.  If you're working in 2D or can use point sprites you don't even need a geometry shader.


#4970381 OpenGL Texture Blur?

Posted by zacaj on 16 August 2012 - 05:51 PM

After you've bound the texture with glBindTexture


#4969927 Enemy faces player

Posted by zacaj on 15 August 2012 - 02:06 PM

Do you rotate the turret using an angle?  If so, you can use atan2 to get the angle from the turret to the player's position.


#4966726 OpenGL 3/4 - 3D Without Lights, and Shader Basics

Posted by zacaj on 06 August 2012 - 11:36 AM

gl_Position acts just like it does in GL2.
in variables act like generic vertex/normal arrays.  When you upload vertex data from your opengl program, you tell it which variable (in_Position,in_Color) to link it to.  Each vertex in the array you upload goes to the vertex shader once.
Out variables are like varying variables.  They get interpolated and given as INputs in the fragment shader, which knows they're the same because they have the same name.
If you understood GL2 shaders all you need to recognize is that with GL3 there are less hard-coded variables.  Instead of using gl_Normal to pass a variable to the fragment shader, you just make your own variable called normal


#4960606 Polygon and texture accuracy

Posted by zacaj on 18 July 2012 - 01:03 PM

The PSX used integer coordinates some place in its rendering pipeline to speed it up, which would make the vertices wobble slightly as they were moved across the screen.  If that box is more than just 6 sides (the places the line changes being new polygons) then that would explain it


#4959272 (C++ Beginner) I hate to post here, but... why won't my "if" stat...

Posted by zacaj on 15 July 2012 - 09:05 AM

You need to do
if (username == "Tiffany" || username =="tiffany"


#4958511 Programming Burden for FFT or Tactics Ogre Game

Posted by zacaj on 12 July 2012 - 01:00 PM

Yeah you're probably not going to have access to the original code.  A lot of the complexity is going to depend on whether you want 2D isometric (SNES/GBA style) or 3D isometric (FFT for PS1)


#4956707 Hybrid Ray Tracing Feasability

Posted by zacaj on 07 July 2012 - 12:50 PM

Can you make a real-time polygonal ray-tracer?  Yes.
Can you make a real-time SVO-based ray-tracer?  I'm not sure if anyone has yet...  John Carmack seemed to think so.  

I was pondering writing an SVO ray-tracer/renderer for complicated objects in my rasterizing polygonal renderer, never got around to it though


#4952457 total noob here. Can you recommend a c++ compiler?

Posted by zacaj on 24 June 2012 - 04:16 PM

This is known as an IDE.  A compiler just takes the name of a file and makes an exe, it doesnt include an editor.  For Windows the best IDEs are Visual Studio (which is made by Microsoft), Code::Blocks, and Eclipse.  I don't know about eclipse but I know Visual Studio and Code::Blocks include a compiler with them.  Id recommend you download Visual Studio 2010 Express edition to start.  
Alternately, there are lots of text editors that you can code in, such as Notepad++ which you can also configure to run a compiler, or even just open a command prompt to run the compiler from




PARTNERS