Jump to content

  • Log In with Google      Sign In   
  • Create Account

dpadam450

Member Since 18 Nov 2005
Offline Last Active Dec 22 2014 09:27 PM

#5137981 Having a VBO/VAO for each object.

Posted by dpadam450 on 10 March 2014 - 06:16 PM

 

I'm working on a 2D Game Framework for a college assignment, I need to handle Basic sprite creation and animation, along with text display.

 

You don't need a vbo then. About 7 years ago when I started openGL I used to draw all my models with glBegin()/glEnd() drawing 100,000 some vertices at 60 fps or more I dont know. So for a basic 2D game say mario, then vbo's arent even needed. So whatever you decide to do I wouldn't worry too much about architecture in managing sprites. Managing sprites/particles in a next-gen 3d renderer is when you need to get down to managing sprite vbos.




#5135562 Large textures are really slow...

Posted by dpadam450 on 28 February 2014 - 10:00 PM

Yea I forgot about alpha test. The overlay you missed my point completely.

.5*healthbar + .5*your_background texture   ==  .5*your_background texture + .5*healthbar

If you put the background drawn first, without alpha blending, it will be in the background. If you blend your health bar on top, the amount of pixels you are blending is only the health bar pixels. (A lot less pixels blending).

Your original image, is the background blended on top, or the healthbar blending on top?....... the user won't know because its the same result. This doesn't hold true for 99% of games, but if that is the extent of your games art design, you can pull off doing this order instead(drawing BG without blending first, then applying blending with the BG). The other 99% of games don't work because usually stuff is drawn in front of stuff behind stuff etc, where they would blend and blend and blend, but since you have only BG blending with really 1 sprite at a time(at each pixel), it doesnt matter which of the 2 images is the SRC and which is the DST. Same math.
http://shogun3d.net/images2/looptil/04.jpg




#5135204 Per pixel lighting with GLSL

Posted by dpadam450 on 27 February 2014 - 04:33 PM

So start from here and build up. When I first started shading I had errors all the time.

Validate your data/uniforms etc. Per pixel lighting:
Calculate the normal in the vertex shader (gl_NormalMatrix*gl_Normal),  in the fragment shader, output gl_FragData[0] = vec4(normal, 1); (Normal validated, dont forget negative number will be black so make sure to pass in some non-negative normals to test).

You can calculate the lightVector in the world or camera space and output to fragData, validate that the color makes sense.

To start just post your 2 shaders and we can look at those. Aside from those looking good, there could be a bad code side where you arent setting up or passing a variable properly.




#5135113 Per pixel lighting with GLSL

Posted by dpadam450 on 27 February 2014 - 12:11 PM

Not sure where you are at. So you have a shader running and compiling? Does gl_FragData[0] = vec4(1,0,0,1)   shade your object all red?




#5134236 I feel like a Noob C++ GL 4.1 and GLSL 3.3 help please!

Posted by dpadam450 on 24 February 2014 - 04:49 PM

Is your quad rendered with the shader on? Are you able to output a debug red color to verify the shader is on?

Are you binding the texture and sending the uniform to the shader?




#5128919 Assassin's Creed IV: Black Flag Ocean Technology Talk

Posted by dpadam450 on 04 February 2014 - 10:27 PM



Take a look at this. There is a demo and a paper somewhere. Most realistic water I've seen.




#5128087 OpenGL Alpha problem.

Posted by dpadam450 on 01 February 2014 - 09:40 PM

This is how blending of any object in 3d rendering or the real world works. What are you specifically trying to do? What effect?




#5127990 z-buffer discontinuity in shaders

Posted by dpadam450 on 01 February 2014 - 12:25 PM

If you are using an edge detection algorithm, why not just use the dot product. If dot product of (normal,viewvec) < .01 or something, you can make the pixel black.




#5124856 Hypothesizing a new lighting method.

Posted by dpadam450 on 19 January 2014 - 11:54 AM

"This means that you get the speed of a deferred renderer (render time = light count + mesh count) with a drastically reduced memory footprint."

 

The speed of a deferred renderer has nothing to do with your algorithm at all. The speed in deferred comes in the fact that you run the pixel shader once for every pixel on the screen. You make pixel shader overdraw = 0. In your algorithm you would still draw an object with a pixel shader and then another object can come along and redraw over that pixel and have to run a pixel shader again (2x for the same pixel).

The algorithm itself doesnt make much sense to me. Why is it a cube map again? What does a mesh use to find the correct light in the cubemap? Why wouldnt it just be a 2D texture of the lights? How exactly does the light get mapped into the cubemap?(its not a 3d Array, its simply 6 faces that designate up down left righ bottom top.

Yes, you don't have the experience enough to finalize your algorithm. I'm planning to do something similar to this, however you have some holes to get to the end and you are in no way related to deferred rendering by this approach.




#5121555 2D Lighting with Shaders

Posted by dpadam450 on 05 January 2014 - 10:40 PM

 

How do I mix the frag color with light color AND ambient color so that ambient color is applied consistently throughout the frame while the light color only has an effect within the lights' attenuation range?

 

Really? You couldn't figure this out? How about lightingCalculation + ambient..............




#5082406 Smooth OpenGL mouse look

Posted by dpadam450 on 02 August 2013 - 12:38 AM

yaw += (diff/8)*speed;
if (yaw > 360)
yaw = 0;

 

yaw = yaw - 360;

if yaw is 380, the end result would be 20 degrees past 360 or 20 degrees. (380 - 360).

Not a solution but a bug in your code.

 




#5080183 Reading the depth buffer

Posted by dpadam450 on 24 July 2013 - 12:06 PM

Welcome to graphics. Look around for shadow map white and you will get hundred of talks about this. The depth buffer is essentially completely white for every shadow map. Print screen, go into photoshop/gimp and change the brightness/contrast till you see an image outline. This works best if the object is close to the camera.

Also GL_UNSIGNED_INT should be GL_FLOAT, GL_DOUBLE, or potentially GL_DEPTH_COMPONENT as well. INT will not work that is for sure, everything in that case would be 1.0 depth for all pixels.




#5076615 OpenGL

Posted by dpadam450 on 10 July 2013 - 08:56 AM

If it wasn't taught (which is most likely a lie). Wouldn't it have made more sense to not wait till the last 3 days? You could have learned how to do this in a couple days, or spread out over a month.




#5076501 Forcing early Z, which extension to use?

Posted by dpadam450 on 09 July 2013 - 09:14 PM

http://www.opengl.org/wiki/Image_Load_Store

Does not load like image_load_store has anything to do with early depth test. So no, you should use the conservative depth.




#5072071 Is there a Game Programming school that you would suggest?

Posted by dpadam450 on 22 June 2013 - 02:32 PM

I can say that at one point Full-Sail students were not getting accepted at EA sports Orlando for certain teams (not sure if it was the whole studio). They just weren't interviewing very well. I work there, my Lead went to Full-Sail and hes been the lead on 2 of my teams, when I came in there were 2 other fulltime and 1 contractor from FullSail, we just hired someone else that came from DigiPen recently as well. I came in a a "try them out" contractor, me and another guy from Full-Sail were the only 2 / 5 contractors to get full-time after that due to good performance.

People can graduate from any school and suck. I had people from DigiPen that I don't think were very smart get through. What I can say though is that DigiPen does teach CS and I don't get where anyone is coming from on this. I worked in the medical field on software. Software is software. You might not learn the most web technologies and you certainly aren't going to just be a Java guy, but I think the really good people coming out of DigiPen are way smarter than a traditional CS degree.

My friend from DigiPen went to a couple places and both places now are like "why the F did we never look at graduates from this school". My current problem with DigiPen, way too expensive. CS though is the one degree there are resources everywhere to boost your growth. You can learn so much stuff in your personal time.

I would suggest against DigiPen only due to the cost of tuition there nowadays. It's insane. If you go to traditional CS, just stay up on C++ and make some games in your own time. Your own ambition will get you somewhere.






PARTNERS