Oolite Bulletins

For information and discussion about Oolite.
It is currently Wed Dec 12, 2018 10:36 pm

All times are UTC




Post new topic  Reply to topic  [ 174 posts ]  Go to page Previous 18 9 10 11 12
Author Message
PostPosted: Sun Oct 07, 2018 11:05 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 553
@phkb Thank you so much!

The newest version is now available via the extension manager:

07/10/2018 - Version 2.9:
* better handling of the alpha channel


Top
   
PostPosted: Tue Oct 09, 2018 6:32 pm 
Offline
Deadly
Deadly
User avatar

Joined: Sat May 01, 2010 9:05 pm
Posts: 194
Location: Scotland
Quote:
You just need a lot more memory on your PC, for all these graphics... :? Right?
I'm not really sure. I know that (some) of these effects are done using "shaders", which somehow offloads the processing required to a graphics sub-system away from the general processing unit. And I recall (from when I last paid attention to such matters, in the 1990s) that graphics cards sometimes (generally? I dunno) have separate memory to the main processor. But how all that adds up, or what bits go where is just a black hole to me.
If I've got work to do on the laptop, it involves text, and occasionally changing the font of the text (but generally, it's the words that matter, not the appearance), so as long as my computer does that, the rest is someone else's problem. Where's my Perilomatic (R) Sunglasses?

_________________
--
Shooting aliens for fun and ... well more fun.
"I'm just stepping out of the airlock for a breath of fresh vacuum. I may be gone some time."


Top
   
PostPosted: Tue Oct 09, 2018 8:46 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Oct 20, 2007 2:52 pm
Posts: 2361
@RockDoctor: °sigh°
@Prester John: Not so much memory. It's more a graphics card which can handle this.

@gsagostinho:The rings are looking great now, gsagostinho!

And after taking a look at the shader - some ideas:

1. It could be worth using Oolites fogUniform for the atmosphere instead. Then you can get rid of quite a bunch of instructions easily. Shift the work to Oolite .-)

2. Let's help the compiler to do the right thing.
Code:
vec3 offset = (up * uFloat2 * -y * 2.0) + (right * uFloat2 * x * 2.0);
could be simplified to
Code:
vec3 offset = ((up * -y) + (right * x)) * uFloat2 * 2.0;

3. Another one to help the compiler.
Code:
r *= min(1.0, distance/5000000.0) - max(0.0, 1.0 - min(1.0, distance/5000000.0)) * sin(r2 * 3178.4 + phase);
doesn't need the max().
Code:
r *= min(1.0, distance/5000000.0) - (1.0 - min(1.0, distance/5000000.0)) * sin(r2 * 3178.4 + phase);
The value will never get negative. And most compilers will reuse the min(1.0, distance/5000000.0), so I left it in. But there's no guarantee that the compiler will reuse it... <mumbles something about stupid things>


4. You could also get rid of some branching
Code:
if (det < 1.0 && dist > 0.0) {
	float dp = (det - 0.8) * 5.0;
	if (dp < 0.2) {
		dp = 0.2;
	}
	r *= dp * 0.25;
	g *= dp * 0.25;
	b *= dp * 0.25;
}
could become
Code:
float dark = float(det < 1.0) * float(dist > 0.0);
float dp = max(0.05,(det * 1.25) - 1.0);
dp = (dp * dark) + (1.0 - dark);
r *= dp;
g *= dp;
b *= dp;
A similiar approach could be used for the threshold calculations.

It's just a start, I know, but better than nothing.
Optimizations will take eat time.

Edit: Optimized further, got rid of logical_if.


Last edited by Svengali on Fri Oct 19, 2018 11:26 am, edited 2 times in total.

Top
   
PostPosted: Tue Oct 09, 2018 9:21 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 553
Thank you SO much, Svengali! Really appreciate this, I have just incorporated your suggestions and they work exactly as they should, so I just made a new release.


Top
   
PostPosted: Tue Oct 09, 2018 11:11 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 553
I just made some more updates:

- more optimizations
- rings get more transparent when entering an atmosphere


Top
   
PostPosted: Sat Oct 13, 2018 10:30 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 553
13/10/2018 - Version 2.10.2:
* some more minor optimizations


Top
   
PostPosted: Tue Oct 16, 2018 12:56 pm 
Online
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 2223
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
There seems to be a fault in the latest version. Here's a shot using a plain 1.86 and just the System Rings OXP (so no chance of any conflicts), at Riedquat (G1)
Image
(unless, of course, this is my graphics card going crazy on me...)

_________________
My OXP's
YouTube: Oolite Teaser Trailer


Top
   
PostPosted: Tue Oct 16, 2018 8:59 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 553
Thanks, I think I know what happened and it should be fixed now. Could you please update your OXP and try again?


Top
   
PostPosted: Tue Oct 16, 2018 10:44 pm 
Online
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 2223
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Ah, much better! Thanks!

_________________
My OXP's
YouTube: Oolite Teaser Trailer


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 174 posts ]  Go to page Previous 18 9 10 11 12

All times are UTC


Who is online

Users browsing this forum: phkb and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited