Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
haveblue
Aug 15, 2005



Toilet Rascal
That or do CPU-mediated multipass.

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal

Raenir Salazar posted:

Would that be from glBegin( gl_primitive ) glEnd()?

You code should look in general like this:

code:
loadAndSetUpShaders()
while(rendering==true)
{
	assignUniforms();
	for(elements of scene)
	{
		glBegin(gl_primitive);
        		setAttributes();
	   	glEnd();
	}
	finishAndPresentFrame();
}

haveblue
Aug 15, 2005



Toilet Rascal
Are you using the stencil buffer? That's exactly what it's for.

haveblue
Aug 15, 2005



Toilet Rascal
If you have the modelview and projection matrices from your shader and the viewport values from the current context, you could use gluUnProject(). But yeah, that sounds like overkill for a 2D scene.

haveblue
Aug 15, 2005



Toilet Rascal
Don't they remove the ARB suffix when that happens?

haveblue
Aug 15, 2005



Toilet Rascal
That's exactly it. Normals are a property of a vertex, not a polygon, so you can't have two polygons with two different normals share the same vertex record.

haveblue
Aug 15, 2005



Toilet Rascal
Licensed engines are also a lot more common now, so Unity or Epic can incur that time and then everyone else gets to skip it.

haveblue
Aug 15, 2005



Toilet Rascal
It's probably easier to add reversed polygons to the underlying model, doing a normal flipping pass each frame doesn't sound like the right approach.

haveblue
Aug 15, 2005



Toilet Rascal
Dumb question- is this within a few hours of setting up the new Mac? You may be losing cycles to spotlight indexing or some other post-config background process.

haveblue
Aug 15, 2005



Toilet Rascal

Kobata posted:

I haven't really done much immediate mode OpenGL, but don't the texture coordinates need to be set before the vertex call? Presumably it's working on later ones because GL remembers the last one set and uses it for the first vertex of later draws.

Yeah, that's exactly what's happening.

haveblue
Aug 15, 2005



Toilet Rascal

Hyvok posted:

However I would like to support unicode

How much unicode do you want to support? The occasional accented character is probably easy enough but if you want to get really into the weeds with composed characters and bidirectional writing and such you might want to considering letting the OS text service handle the whole thing and make you one finished texture per label. Rolling your own unicode-aware layout is not something to be entered into lightly.

haveblue fucked around with this message at 21:01 on Apr 13, 2017

haveblue
Aug 15, 2005



Toilet Rascal
The mathematical name for that is implicit surface and while that wiki page is way above my pay grade it may give you some ideas to start with.

haveblue
Aug 15, 2005



Toilet Rascal
Yeah, how much do you know about non-shader programming already? The contents of _______.hlsl is a program, just in a language specialized for doing certain kinds of math and with different quirks and limitations from general-purpose programming.

haveblue
Aug 15, 2005



Toilet Rascal
What do you want to do? If you just want to be able to throw together programmer art for small projects, Blender is fine. If you want to make something releasable or develop marketable skills, you will have to graduate to industry-standard tools at some point.


e: I should have read further, Blender is probably perfect for "design aid".

haveblue fucked around with this message at 22:21 on Feb 1, 2020

haveblue
Aug 15, 2005



Toilet Rascal
Skewed image usually means the row length is wrong, are you calling glPixelStore?

haveblue
Aug 15, 2005



Toilet Rascal
Also are you sure the range of the texture channel values is 0-1? If the texture uses an integer pixel format it could be 0-255 and casting it to float won't necessarily normalize it.

What happens if you assign 1.0 to red in the second example?

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal
If you're using the fixed function pipeline, GL can do this for you with with the cull options. Then you just render it twice, for front and back, with matching offset values

If you're in a shader, check the sign of normal.z after the modelview transformation

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply