• 9
• 9
• 10
• 9
• 10
• ### Similar Content

• By lxjk
Hi guys,
There are many ways to do light culling in tile-based shading. I've been playing with this idea for a while, and just want to throw it out there.
Because tile frustums are general small compared to light radius, I tried using cone test to reduce false positives introduced by commonly used sphere-frustum test.
On top of that, I use distance to camera rather than depth for near/far test (aka. sliced by spheres).
This method can be naturally extended to clustered light culling as well.
The following image shows the general ideas

Performance-wise I get around 15% improvement over sphere-frustum test. You can also see how a single light performs as the following: from left to right (1) standard rendering of a point light; then tiles passed the test of (2) sphere-frustum test; (3) cone test; (4) spherical-sliced cone test

I put the details in my blog post (https://lxjk.github.io/2018/03/25/Improve-Tile-based-Light-Culling-with-Spherical-sliced-Cone.html), GLSL source code included!

Eric

• Good evening everyone!

I was wondering if there is something equivalent of  GL_NV_blend_equation_advanced for AMD?
Basically I'm trying to find more compatible version of it.

Thank you!

• Hello guys,

How do I know? Why does wavefront not show for me?
I already checked I have non errors yet.

And my download (mega.nz) should it is original but I tried no success...
- Add blend source and png file here I have tried tried,.....

PS: Why is our community not active? I wait very longer. Stop to lie me!
Thanks !

• I wasn't sure if this would be the right place for a topic like this so sorry if it isn't.
I'm currently working on a project for Uni using FreeGLUT to make a simple solar system simulation. I've got to the point where I've implemented all the planets and have used a Scene Graph to link them all together. The issue I'm having with now though is basically the planets and moons orbit correctly at their own orbit speeds.
I'm not really experienced with using matrices for stuff like this so It's likely why I can't figure out how exactly to get it working. This is where I'm applying the transformation matrices, as well as pushing and popping them. This is within the Render function that every planet including the sun and moons will have and run.
if (tag != "Sun") { glRotatef(orbitAngle, orbitRotation.X, orbitRotation.Y, orbitRotation.Z); } glPushMatrix(); glTranslatef(position.X, position.Y, position.Z); glRotatef(rotationAngle, rotation.X, rotation.Y, rotation.Z); glScalef(scale.X, scale.Y, scale.Z); glDrawElements(GL_TRIANGLES, mesh->indiceCount, GL_UNSIGNED_SHORT, mesh->indices); if (tag != "Sun") { glPopMatrix(); } The "If(tag != "Sun")" parts are my attempts are getting the planets to orbit correctly though it likely isn't the way I'm meant to be doing it. So I was wondering if someone would be able to help me? As I really don't have an idea on what I would do to get it working. Using the if statement is truthfully the closest I've got to it working but there are still weird effects like the planets orbiting faster then they should depending on the number of planets actually be updated/rendered.

• Hello everyone,
I have problem with texture

# OpenGL Opengl-Using a shader, is it necessary?

This topic is 969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

in my Android game im drawing a rectangle and binding a texture to it using this code:

   gl.glVertexPointer(3, GLES10.GL_FLOAT, 0, mBufVertices);
// Enable color array.
gl.glEnableClientState(GLES10.GL_COLOR_ARRAY);
gl.glColorPointer(4, GLES10.GL_FLOAT, 0, mBufColors);
gl.glEnable(GL10.GL_BLEND);
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glBindTexture(GL10.GL_TEXTURE_2D, renderTex[1]);
gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, mVerticesCountFront);
gl.glDisable(GL10.GL_BLEND);
gl.glDisable(GL10.GL_TEXTURE_2D);

every thing is fine, But the problem is that i want the rectangle to be completely transparent and just draw the texture visible on it, meaning i want the yellow part to be transparent:

i tried to change the rectangle vertex color and make them transparent, but this made the Whole page transparent even the texture.

does i have to use a shader to do what i want?

##### Share on other sites

I dont know if you have to, but you absolutely should. That way you have full control of whats happening which might be useful in the future. The shaders should be pretty simple if you are just doing some 2D stuff and not photorealistic rendering with 50 different material types.

##### Share on other sites

The description is not particularly clear about what you want to do, but if you insist on not using shaders you might want to try using glTexEnvi, maybe with GL_DECAL.

##### Share on other sites

The description is not particularly clear about what you want to do, but if you insist on not using shaders you might want to try using glTexEnvi, maybe with GL_DECAL.

i have a texture, which has alpha, i want the alpha parts of the texture drawing to triangle to be transparent:

(i should mention that i set the triangle vertices color to yellow)

##### Share on other sites

It should work fine without shaders.

(Though shaders would be recommended, after getting used to the idea of them, a lot of things are actually easier in a programmable pipeline instead of a fixed function one. Under the hood, the fixed function pipeline also uses shaders, you just do not have direct control over them)

Kind of looks like you do not have alpha in the texture where you expect it.

Another possibility is drawing in the wrong order, if you draw with depth test enabled.

(that is, you try to draw the foreground before drawing the background)

Edited by Olof Hedman

##### Share on other sites

how did you load the texture?

##### Share on other sites

It should work fine without shaders.

(Though shaders would be recommended, after getting used to the idea of them, a lot of things are actually easier in a programmable pipeline instead of a fixed function one. Under the hood, the fixed function pipeline also uses shaders, you just do not have direct control over them)

Kind of looks like you do not have alpha in the texture where you expect it.

Another possibility is drawing in the wrong order, if you draw with depth test enabled.

(that is, you try to draw the foreground before drawing the background)

Thank you Very Much, the Problem Exactly was what you mentioned.  i draw the triangle before drawing the texture, and that was the problem.

thanks again.