Преглед на файлове

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

naelstrof преди 10 години
родител
ревизия
65acba31ae
променени са 3 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 6
    2
      CMakeLists.txt
  2. 1
    1
      README.md
  3. 2
    0
      share/slop/refract.frag

+ 6
- 2
CMakeLists.txt Целия файл

2
 
2
 
3
 project( "slop" )
3
 project( "slop" )
4
 set( slop_VERSION_MAJOR 4 )
4
 set( slop_VERSION_MAJOR 4 )
5
-set( slop_VERSION_MINOR 2 )
5
+set( slop_VERSION_MINOR 3 )
6
 set( slop_VERSION_PATCH 20 )
6
 set( slop_VERSION_PATCH 20 )
7
 
7
 
8
 set( CMAKE_OPENGL_SUPPORT FALSE CACHE BOOL "Whether or not to compile with OpenGL, shaders, magnification, and theming support." )
8
 set( CMAKE_OPENGL_SUPPORT FALSE CACHE BOOL "Whether or not to compile with OpenGL, shaders, magnification, and theming support." )
12
    set( CMAKE_INSTALL_PREFIX "/usr" )
12
    set( CMAKE_INSTALL_PREFIX "/usr" )
13
 endif()
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
 if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
19
 if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
16
    set( CMAKE_BUILD_TYPE RelWithDebInfo )
20
    set( CMAKE_BUILD_TYPE RelWithDebInfo )
17
 endif()
21
 endif()
159
 install( TARGETS ${BIN_TARGET}
163
 install( TARGETS ${BIN_TARGET}
160
          DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
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
 if( CMAKE_OPENGL_SUPPORT )
168
 if( CMAKE_OPENGL_SUPPORT )
165
     install( DIRECTORY "${CMAKE_SOURCE_DIR}/share"
169
     install( DIRECTORY "${CMAKE_SOURCE_DIR}/share"

+ 1
- 1
README.md Целия файл

115
 help
115
 help
116
 ----
116
 ----
117
 ```text
117
 ```text
118
-slop v4.2.20
118
+slop v4.3.20
119
 
119
 
120
 Copyright (C) 2014 Dalton Nell, Slop Contributors
120
 Copyright (C) 2014 Dalton Nell, Slop Contributors
121
 (https://github.com/naelstrof/slop/graphs/contributors)
121
 (https://github.com/naelstrof/slop/graphs/contributors)

+ 2
- 0
share/slop/refract.frag Целия файл

27
     vec2 offset = (p/len)*cos(len*12.0-time*4.0)*0.005;
27
     vec2 offset = (p/len)*cos(len*12.0-time*4.0)*0.005;
28
 
28
 
29
     // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889)
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
     vec3 incrementalGaussian;
32
     vec3 incrementalGaussian;
31
     incrementalGaussian.x = 1.0f / (sqrt(2.0f * pi) * sigma);
33
     incrementalGaussian.x = 1.0f / (sqrt(2.0f * pi) * sigma);
32
     incrementalGaussian.y = exp(-0.5f / (sigma * sigma));
34
     incrementalGaussian.y = exp(-0.5f / (sigma * sigma));