Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopson97 committed Sep 13, 2017
1 parent 873f869 commit 0525ada
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Binary file modified Res/Textures/DefaultPack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Shaders/SkyboxFragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ vec3 gamma(vec3 value, float param)

void main()
{
color = texture(texSampler, passTextureCoord);
color = vec4(brightnessContrast(color.xyz, 1.15f, 1.1f), color.w);
color = vec4(gamma(color.xyz, 3.3f),color.w);
color = texture(texSampler, passTextureCoord);
//color = vec4(brightnessContrast(color.xyz, 1.15f, 1.1f), color.w);
//color = vec4(gamma(color.xyz, 3.3f),color.w);

outColour = color;
if (outColour.a == 0) discard;
Expand Down
6 changes: 3 additions & 3 deletions Source/World/Chunk/ChunkMeshBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int faces;
void ChunkMeshBuilder::buildMesh()
{
AdjacentBlockPositions directions;
const ChunkBlock* blockPointer = m_pChunk->begin();
m_pBlockPtr = m_pChunk->begin();
faces = 0;
for (int8_t y = 0; y < CHUNK_SIZE; ++y)
{
Expand All @@ -125,8 +125,8 @@ void ChunkMeshBuilder::buildMesh()
for (int8_t z = 0; z < CHUNK_SIZE; ++z)
for (int8_t x = 0; x < CHUNK_SIZE; ++x)
{
ChunkBlock block = *blockPointer;
blockPointer++;
ChunkBlock block = *m_pBlockPtr;
m_pBlockPtr++;

sf::Vector3i position(x, y, z);
setActiveMesh(block);
Expand Down
1 change: 1 addition & 0 deletions Source/World/Chunk/ChunkMeshBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ChunkMeshBuilder

bool shouldMakeLayer(int y);

const ChunkBlock* m_pBlockPtr = nullptr;
ChunkSection* m_pChunk = nullptr;
ChunkMeshCollection* m_pMeshes = nullptr;
ChunkMesh* m_pActiveMesh = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion config.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
renderdistance 8
renderdistance 16
fullscreen 1
windowsize 1280 720
fov 100

0 comments on commit 0525ada

Please sign in to comment.