Jump to content

Recommended Posts

Posted

My mod adds a custom lightning bolt called dark lightning, with a custom renderer to make it render darkly. However, I am unable to colour the lightning black, no matter how I set the colour values.

 

RenderDarkLightning:

 

  Reveal hidden contents

 

 

Update: When I don't enable GL_BLEND, the lightning does indeed render in black - but solidly. I want black-coloured lightning, not a large black line in the world :/

Posted
  On 10/5/2014 at 2:16 AM, TheGreyGhost said:

Hi

 

Try using this blend function instead of GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);

 

GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

 

Use an alpha value of (say) 0.25 to start off with.

 

This online tool might be helpful,

http://www.andersriggelsen.dk/glblendfunc.php

also this background info link

http://www.glprogramming.com/red/chapter06.html

 

-TGG

 

IT WORKED! Thank you! I really should get down to learning OpenGL properly...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.