Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
edge-of-space
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dario Seyb
edge-of-space
Commits
d49d0bb5
Commit
d49d0bb5
authored
Feb 23, 2016
by
Dario Seyb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved noise a bit
parent
9de041b5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
3 deletions
+10
-3
data/config/settings.json
data/config/settings.json
+1
-0
data/shader/noise/noise3d.glsl
data/shader/noise/noise3d.glsl
+1
-1
src/game/include/engine/core/SettingsSystem.hpp
src/game/include/engine/core/SettingsSystem.hpp
+3
-1
src/game/src/engine/core/SettingsSystem.cpp
src/game/src/engine/core/SettingsSystem.cpp
+4
-0
src/game/src/engine/core/WindowSystem.cpp
src/game/src/engine/core/WindowSystem.cpp
+1
-1
No files found.
data/config/settings.json
View file @
d49d0bb5
{
"resolution"
:
[
1280
,
720
],
"target_fps"
:
60
,
"vsync"
:
false
,
"fullscreen"
:
false
,
"quality"
:
"high"
,
"ssao"
:
false
,
...
...
data/shader/noise/noise3d.glsl
View file @
d49d0bb5
...
...
@@ -121,7 +121,7 @@ float hash_noise( in vec3 x )
return
mix
(
mix
(
mix
(
hash
(
n
+
0
.
0
),
hash
(
n
+
1
.
0
),
f
.
x
),
mix
(
hash
(
n
+
157
.
0
),
hash
(
n
+
158
.
0
),
f
.
x
),
f
.
y
),
mix
(
mix
(
hash
(
n
+
113
.
0
),
hash
(
n
+
114
.
0
),
f
.
x
),
mix
(
hash
(
n
+
270
.
0
),
hash
(
n
+
271
.
0
),
f
.
x
),
f
.
y
),
f
.
z
)
*
2
.
0
-
1
.
0
;
mix
(
hash
(
n
+
270
.
0
),
hash
(
n
+
271
.
0
),
f
.
x
),
f
.
y
),
f
.
z
)
*
4
.
0
-
2
.
0
;
}
...
...
src/game/include/engine/core/SettingsSystem.hpp
View file @
d49d0bb5
...
...
@@ -34,7 +34,8 @@ private:
QualitySetting
m_qualitySetting
;
bool
m_fullscreen
;
bool
m_ssaoEnabled
;
uint64_t
m_targetFps
;
bool
m_vsyncEnabled
;
uint64_t
m_targetFps
;
std
::
string
m_defaultScene
;
std
::
string
m_defaultPlanetType
;
...
...
@@ -57,6 +58,7 @@ public:
inline
glm
::
ivec2
getResolution
()
const
{
return
m_resolution
;
}
inline
bool
getFullscreen
()
const
{
return
m_fullscreen
;
}
inline
bool
ssaoEnabled
()
const
{
return
m_ssaoEnabled
;
}
inline
bool
vsyncEnabled
()
const
{
return
m_vsyncEnabled
;
}
inline
uint64_t
getTargetFps
()
const
{
return
m_targetFps
;
}
inline
QualitySetting
getQualitySetting
()
const
{
return
m_qualitySetting
;
}
inline
std
::
string
getDefaultScene
()
const
{
return
m_defaultScene
;
}
...
...
src/game/src/engine/core/SettingsSystem.cpp
View file @
d49d0bb5
...
...
@@ -44,6 +44,7 @@ bool SettingsSystem::startup() {
m_resolution
=
{
1280
,
720
};
m_qualitySetting
=
QualitySetting
::
High
;
m_fullscreen
=
false
;
m_vsyncEnabled
=
true
;
m_targetFps
=
60
;
m_defaultScene
=
"AtmosphereTest"
;
m_defaultPlanetType
=
"earth"
;
...
...
@@ -108,6 +109,9 @@ bool SettingsSystem::startup() {
}
else
if
(
i
.
first
==
"ssao"
)
{
VALIDATE_TYPE
(
i
,
bool
);
m_ssaoEnabled
=
i
.
second
.
get
<
bool
>
();
}
else
if
(
i
.
first
==
"vsync"
)
{
VALIDATE_TYPE
(
i
,
bool
);
m_vsyncEnabled
=
i
.
second
.
get
<
bool
>
();
}
else
if
(
i
.
first
==
"target_fps"
)
{
VALIDATE_TYPE
(
i
,
int64_t
);
m_targetFps
=
i
.
second
.
get
<
int64_t
>
();
...
...
src/game/src/engine/core/WindowSystem.cpp
View file @
d49d0bb5
...
...
@@ -114,7 +114,7 @@ bool WindowSystem::createWindow() {
}
// Use Vsync
if
(
SDL_GL_SetSwapInterval
(
1
)
<
0
)
{
if
(
SDL_GL_SetSwapInterval
(
m_settings
->
vsyncEnabled
()
?
1
:
0
)
<
0
)
{
printf
(
"Warning: Unable to set VSync! SDL Error: %s
\n
"
,
SDL_GetError
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment