State of Fortune

After Mr. Agent helped out with the fps drop due to AA he also gave me some hints on how to add AA to transparent objects like the trees and the grain without sorting them. I am now using GL_SAMPLE_ALPHA_TO_COVERAGE, which gives a much calmer look. Here are two new screenshots while using that technique.

As always, click for a larger version :slight_smile:

http://stateoffortune.com/pictures/screenshots/alpha1/AAtreessmall.jpg


http://stateoffortune.com/pictures/screenshots/alpha1/AAsunsetsmall.jpg

Mike

It looks awesome :slight_smile: but, when I enter game my monitor goes black except for an ā€œInput not supportedā€ message :frowning:

Note that I’m running Linux Mint with an Ivybridge i7 but not graphics card (just the Intel 4000 graphics), so perhaps it doesn’t like the Intel graphics? Or maybe doesn’t like mint?

It looks awesome :slight_smile: but, when I enter game my monitor goes black except for an ā€œInput not supportedā€ message :frowning:

Note that I’m running Linux Mint with an Ivybridge i7 but not graphics card (just the Intel 4000 graphics), so perhaps it doesn’t like the Intel graphics? Or maybe doesn’t like mint?

Hi,

I’ve had people use both Linux and Intel and both have worked separately. Input not supported sounds like it’s not agreeing with the resolution that your driver is telling me that it’s supporting. There is no error thrown, maybe you could try to change the resolutionH(eight) and W(idth) in the app data / State of Fortune / settings.dat file to one that you know is supported?

In other news. I’ve been busy with personal life stuff, but I’m almost done with an update that contains a rewrite of all the shaders to not have a single if/else/float(a==1) in them (which increased the fps with 10-40%), adding a notification bar with how long effects like bread is active and official support for the Oculus Rift.

Mike

Hi,

I’ve had people use both Linux and Intel and both have worked separately. Input not supported sounds like it’s not agreeing with the resolution that your driver is telling me that it’s supporting. There is no error thrown, maybe you could try to change the resolutionH(eight) and W(idth) in the app data / State of Fortune / settings.dat file to one that you know is supported?

In other news. I’ve been busy with personal life stuff, but I’m almost done with an update that contains a rewrite of all the shaders to not have a single if/else/float(a==1) in them (which increased the fps with 10-40%), adding a notification bar with how long effects like bread is active and official support for the Oculus Rift.

Mike

float() does not run as a branch:


float x = float(f < 1.0); //Not a branch
float y = float(f > 1.0 && f < 2.0); //BRANCH!
float z = float(f > 1.0)*float(f < 1.0); //Same as y, but no branch

float w = f < 1.0 ? 5.0 : 4.0; //Still no branch

GPUs have special assembly instructions for many cases and can sometimes optimize out branches.

EDIT:
Actually, [icode]float y = float(f > 1.0 && f < 2.0);[/icode] is sometimes optimized to something similar to Z.

float() does not run as a branch:


float x = float(f < 1.0); //Not a branch
float y = float(f > 1.0 && f < 2.0); //BRANCH!
float z = float(f > 1.0)*float(f < 1.0); //Same as y, but no branch

float w = f < 1.0 ? 5.0 : 4.0; //Still no branch

GPUs have special assembly instructions for many cases and can sometimes optimize out branches.

EDIT:
Actually, [icode]float y = float(f > 1.0 && f < 2.0);[/icode] is sometimes optimized to something similar to Z.


float y = float(f > 1.0 && f < 2.0); //BRANCH!

what about:

float y = float((f > 1.0) & (f < 2.0))

?


float y = float(f > 1.0 && f < 2.0); //BRANCH!

what about:

float y = float((f > 1.0) & (f < 2.0))

?

GLSL doesn’t support the & operator, only the && operator. Parentheses do not seem to impact the result on AMD cards at least.

GLSL doesn’t support the & operator, only the && operator. Parentheses do not seem to impact the result on AMD cards at least.

Right, then I removed some branches and changed some code unnecessarily :slight_smile: I also applied conditional parsing to not run any unnecessary code based on the current graphical settings.

I used these examples (when_lt is broke though) to get a speed bump:
http://theorangeduck.com/page/avoiding-shader-conditionals

Mike

Right, then I removed some branches and changed some code unnecessarily :slight_smile: I also applied conditional parsing to not run any unnecessary code based on the current graphical settings.

I used these examples (when_lt is broke though) to get a speed bump:
http://theorangeduck.com/page/avoiding-shader-conditionals

Mike

Thanks, but that didn’t quite work. Those parameters weren’t initially in the file, but I added them, and same results. I also tried setting it windowed mode, still the same thing happened.

Since it seems to be trying to go full screen by default (and always) why not just use something like…


        DisplayMode mode = Display.getDesktopDisplayMode();
        Display.setDisplayMode(mode);

…to just use the resolutions and frequency of the desktop (which is sure to already be right, and save any problem of changing setting if there is a crash). EDIT: I’ve used this in something I was working on, and that code worked for me.

Again, it looks great in the videos, just can’t get it to work.

Thanks, but that didn’t quite work. Those parameters weren’t initially in the file, but I added them, and same results. I also tried setting it windowed mode, still the same thing happened.

Since it seems to be trying to go full screen by default (and always) why not just use something like…


        DisplayMode mode = Display.getDesktopDisplayMode();
        Display.setDisplayMode(mode);

…to just use the resolutions and frequency of the desktop (which is sure to already be right, and save any problem of changing setting if there is a crash). EDIT: I’ve used this in something I was working on, and that code worked for me.

Again, it looks great in the videos, just can’t get it to work.

Thanks for the feedback, I changed it to default to windowed mode just in case. It might be that your gfx card is reporting that it can handle a higher hz than your screen likes and I always grab the highest hz. I’ll just change it so it doesn’t go above the hz of your current desktop display mode just in case.

It’s part of the next update (whenever that’ll be :)). I’ll write you a PM when it is live.

Mike

Thanks for the feedback, I changed it to default to windowed mode just in case. It might be that your gfx card is reporting that it can handle a higher hz than your screen likes and I always grab the highest hz. I’ll just change it so it doesn’t go above the hz of your current desktop display mode just in case.

It’s part of the next update (whenever that’ll be :)). I’ll write you a PM when it is live.

Mike

After a break of a few months I picked up the game again a couple of weeks ago. There are a lot of changes already finished for the next big update with things like LWJGL3, Oculus Rift support, better land generation, a lot of bugs fixed and more. I have no idea when the update is coming out, but I’d like to add more content as well so it’s not the same boring tasks as it used to be.

The new landscape look with a lot of changes to texture resizing for mip maps, better normals and a couple of other things:

http://stateoffortune.com/pictures/screenshots/alpha3/landscapesmall.jpg

Mountains are still too much like high round hills, I’ll see how I can improve on that part of the noise. This is a part of the mountain range you can see in the distance in the previous screenshot, some 5-6km away:

http://stateoffortune.com/pictures/screenshots/alpha3/mountainsunsetsmall.jpg

As always, click for a bigger version.

Mike

After a break of a few months I picked up the game again a couple of weeks ago. There are a lot of changes already finished for the next big update with things like LWJGL3, Oculus Rift support, better land generation, a lot of bugs fixed and more. I have no idea when the update is coming out, but I’d like to add more content as well so it’s not the same boring tasks as it used to be.

The new landscape look with a lot of changes to texture resizing for mip maps, better normals and a couple of other things:

http://stateoffortune.com/pictures/screenshots/alpha3/landscapesmall.jpg

Mountains are still too much like high round hills, I’ll see how I can improve on that part of the noise. This is a part of the mountain range you can see in the distance in the previous screenshot, some 5-6km away:

http://stateoffortune.com/pictures/screenshots/alpha3/mountainsunsetsmall.jpg

As always, click for a bigger version.

Mike

Sorry for the necro, but is this dead? D: