Explorar el Código

Fixed an issue where slop doesn't know where the shaders are located, by adding another CMake variable and fixed refract fragment shader.

naelstrof hace 10 años
padre
commit
65acba31ae
Se han modificado 3 ficheros con 9 adiciones y 3 borrados
  1. 6
    2
      CMakeLists.txt
  2. 1
    1
      README.md
  3. 2
    0
      share/slop/refract.frag

+ 6
- 2
CMakeLists.txt Ver fichero

@@ -2,7 +2,7 @@ cmake_minimum_required( VERSION 2.8 )
2 2
 
3 3
 project( "slop" )
4 4
 set( slop_VERSION_MAJOR 4 )
5
-set( slop_VERSION_MINOR 2 )
5
+set( slop_VERSION_MINOR 3 )
6 6
 set( slop_VERSION_PATCH 20 )
7 7
 
8 8
 set( CMAKE_OPENGL_SUPPORT FALSE CACHE BOOL "Whether or not to compile with OpenGL, shaders, magnification, and theming support." )
@@ -12,6 +12,10 @@ if( NOT CMAKE_INSTALL_PREFIX )
12 12
    set( CMAKE_INSTALL_PREFIX "/usr" )
13 13
 endif()
14 14
 
15
+if( NOT INSTALL_PREFIX )
16
+   set( INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "The path where slop thinks it resides in, so that it can find the shaders. This is not necessarily the CMAKE_INSTALL_PREFIX. For example if the shaders will exist in /usr/share/slop, INSTALL_PREFIX should be \"/usr\"." )
17
+endif()
18
+
15 19
 if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
16 20
    set( CMAKE_BUILD_TYPE RelWithDebInfo )
17 21
 endif()
@@ -159,7 +163,7 @@ endif()
159 163
 install( TARGETS ${BIN_TARGET}
160 164
          DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
161 165
 
162
-add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
166
+add_definitions(-DINSTALL_PREFIX="${INSTALL_PREFIX}")
163 167
 
164 168
 if( CMAKE_OPENGL_SUPPORT )
165 169
     install( DIRECTORY "${CMAKE_SOURCE_DIR}/share"

+ 1
- 1
README.md Ver fichero

@@ -115,7 +115,7 @@ Feel free to make your own themes and submit a pull request to see if it can be
115 115
 help
116 116
 ----
117 117
 ```text
118
-slop v4.2.20
118
+slop v4.3.20
119 119
 
120 120
 Copyright (C) 2014 Dalton Nell, Slop Contributors
121 121
 (https://github.com/naelstrof/slop/graphs/contributors)

+ 2
- 0
share/slop/refract.frag Ver fichero

@@ -27,6 +27,8 @@ void main() {
27 27
     vec2 offset = (p/len)*cos(len*12.0-time*4.0)*0.005;
28 28
 
29 29
     // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889)
30
+    float blurSize = 1.f/desktopWidth*blurMultiplier;
31
+    vec2 blurMultiplyVec      = vec2(0.0f, 1.0f);
30 32
     vec3 incrementalGaussian;
31 33
     incrementalGaussian.x = 1.0f / (sqrt(2.0f * pi) * sigma);
32 34
     incrementalGaussian.y = exp(-0.5f / (sigma * sigma));