Jump to content

  • Log In with Google      Sign In   
  • Create Account


SaTANO

Member Since 25 Dec 2009
Offline Last Active Aug 09 2014 03:09 PM

#5053945 Know c/c++ and Java (+basics in opengl) Where do I dev my gamedev skills?

Posted by SaTANO on 16 April 2013 - 01:13 PM

Well I am making my own engines (one universal and several project specifc)

But I think that Unity is the best choice to start with.

You should be able to do a lot of work without need to write a lot of code. Yes Unity is really powerful tool

.......

Oh and you shold also look at UDK ;)




#5006237 Blur shader (2 passes)

Posted by SaTANO on 02 December 2012 - 02:33 AM

I am not sure if I understand correctly your rendering cycle but if you have scene already rendered in texture and you want to use separable blur like gaussian you dont need one texture for each pass.
when you are rendering you only need destination target (texture or renderbuffer). When you want to do 2 pass blur you need texture A as source and texture B as destination. After first pass you can simply switch them and use texture B as source and texture A as destination.
So this mean than you only need 2 textures (surce and destination) but you must done this in final step because you wont be able to acces original, non blured, scene texture


#4995780 Reusing VBOs (or lists)

Posted by SaTANO on 31 October 2012 - 04:38 AM

As far as I understand... you dont want to bind VBO once and render it several times but render it also once with multiple output meshes
Technique you are looking for is called geometry instanceing
check this:
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter03.html
But there are several things to check before using it
OpenGL 3.2 / Geometry shader support
For GLSL version try this:
http://www.geeks3d.com/20111111/simple-introduction-to-geometry-shaders-glsl-opengl-tutorial-part1/


#4969098 Apple OpenGL (AGL) Question

Posted by SaTANO on 13 August 2012 - 09:43 AM

ObjC approach is based on subclassing NSOpenGLView:
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_drawing/opengl_drawing.html#//apple_ref/doc/uid/TP40001987-CH404-SW8

If you don't like ObjC you should check this
http://ttjcrew.com/2009/06/27/beginning-opengl-on-os-x/
You should also check this one (correctly setting target)
http://www.autofasurer.net/wp/?p=106


#4957898 GLSL spotlight+scale problem

Posted by SaTANO on 10 July 2012 - 11:45 PM

Well you are probably right. It depends on how you calculate this matrix.
When matrix scale is non uniform normal matrix is not simple 3x3 matrix from your 4x4 modelview matrix

You should check this:
http://www.lighthouse3d.com/tutorials/glsl-tutorial/the-normal-matrix/


#4910183 Simple 3dModels displays, but more complex ones don't. Memory limit, buff...

Posted by SaTANO on 06 February 2012 - 09:49 AM

I made some applications for iPhone with more complex geometry 8000+ poly (just for testing) and it works correct
There should be problem with your allocations in VBO (indexes probably) which should be OK for simple objects like cube in front view
- check your index count and vertex count in VBO creation state
- also check for quads vs. triangles (index count from 4 to 6), are you exporting direct triangles?


#4896927 Texturing light dependance?

Posted by SaTANO on 23 December 2011 - 03:42 PM

I am not sure what exactly you are trying to render but from what I read:
- you are rendering cubes vs planes in loop
- you want your cubes to be red and plane has texture applied
If your BindTexture function also enable texturing you should disable it before rendering cube

so if you are using multiple texture units you should activate it
- glActiveTexture(GL_TEXTURE0)
and disable texturing by
- glDisable(GL_TEXTURE_2D)


#4886328 GLSL lighting problem (normals)

Posted by SaTANO on 21 November 2011 - 02:25 PM

Correct this
vec3 vertex_normal = normalize(gl_NormalMatrix * gl_Normal );
OpenGL use column major matrices (same as your gl_Position calculation)


#4885770 Using options in shader

Posted by SaTANO on 19 November 2011 - 08:46 PM


There is no & but you should consider how often you will use it
Easiest way is to process options comparing values from MSB to LSB before you use them

opt_tex = (options >= OPTION_TEXTURE)?1:0;
options -= opt_tex * OPTION_TEXTURE;
...
opt_pos = (options >= OPTION_POSITION)?1:0;

if you are planing to use only 4 options you should use fract() and masks
const float inverseNextMSB = 1.0/16.0;
const vec4 bits = vec4( 1.0,2.0,4.0,8.0);
const vec4 mask = vec4(0.5,0.5,0.5,0.0);
void main()
{
	float normalizedOpts = options * inverseNextMSB;
	vec4 opts = vec4( fract( bits* normalizedOpts ) );
	opts -= opts.yzww * mask;
	//at this point xyzw represent bits 0:NO, 0.5:YES  from MSB to LSB (x: MSB, w:LSB)
	...
}
Last thing I should try is to create const vec4 array of all possible combination (dumb but it should work)

If you want to make it fast just make all possible versions of shader and compile it using #define


PARTNERS