Age Verification
This website contains age-restricted material including nudity and explicit content. By entering, you confirm being at least 18 years old or the age of majority in the jurisdiction you are accessing the website from.
I am 18+ or older - Enter
I am under 18 - Exit
Our parental controls page explains how you can easily block access to this site.

最后发帖 - 页数 1034

  论坛

TheEmu
已加入 在 Jul 2012
7424 发布

Discussions for Scenes for Version 1.2.X Fullscreen Mode here

关于iStripper的一切
June 24, 2019, 5111 回复
My standard null shader is

// ============================================================================
// ============================================================================
// ============================================================================
// == ==
// == Name : TheEmuLib.Emu_Null.fsh ==
// == Type : Fragment shader ==
// == Version : 1.0.0 (2017/02/26) ==
// == Creator : TheEmu © TheEmu 2017, Some Rights Reserved ==
// == Licence : Creative Commons Attribution-ShareAlike 4.0 ==
// == http://creativecommons.org/licences/by-sa/4.0 ==
// == ==
// == Purpose: Do nothing to an image. ==
// == ==
// == Description: Simply sets the colour of the current pixel to that read ==
// == from the source image. This shader is useful only when it is necessary ==
// == to override the default shader, in particular for a clipNameSprite. ==
// == ==
// == This file is a member of The Emu's shader library. ==
// == ==
// == ====================================================================== ==
// == ==
// == Update history: ==
// == ==
// == 2017/02/26 - v1.0.0 - Initial version ==
// == ==
// ============================================================================
// ============================================================================
// ============================================================================

// ============================================================================
// == Standard shader inputs ==================================================
// ============================================================================

uniform float u_Elapsed; // The elapsed time in seconds
uniform vec2 u_WindowSize; // Window dimensions in pixels

// The image that is to be manipulated.

uniform sampler2D iChannel0;

// ============================================================================
// == Imports from TheEmuLib ==================================================
// ============================================================================
//
// The GLSL shader language currently provides no mechanism for importing any
// elements that are defined in other modules, not even C's crude source level
// #include mechanism. In the absence of anything better TheEmuLib handles any
// imports by manually copying relevant utility code snippets from the sources
// in the Shader Lib.Inc directory. This is very crude but I have attempted to
// be systematic in the way in which this is presented in the library sources.
//
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

// Functions from TheEmuLib.Emu_Coordinate_Normalisation.lib.src

vec2 Emu_Normalise_to_Window ( vec2 xy ) { return xy / u_WindowSize.xy; }

// ============================================================================
// == The shader's main routine ===============================================
// ============================================================================

void main ( void )
{
// Get the normalised coordinates of the current point.

vec2 uv = Emu_Normalise_to_Window ( gl_FragCoord.xy );

// Update shader outputs.

gl_FragColor = texture2D(iChannel0,uv) * gl_Color;

}

but you sometimes want to add

uv.y = 1.0 - uv.y;

immediately after

vec2 uv = Emu_Normalise_to_Window ( gl_FragCoord.xy );

which, for the pre-inverting version you are asking for can be reduced to

uniform vec2 u_WindowSize; // Window dimensions in pixels
uniform sampler2D iChannel0;

void main ( void )
{
vec2 uv = gl_FragCoord.xy / u_WindowSize.xy;
uv.y = 1.0 - uv.y;
gl_FragColor = texture2D(iChannel0,uv) * gl_Color;
}

or to

uniform vec2 u_WindowSize; // Window dimensions in pixels
uniform sampler2D iChannel0;

void main ( void )
{
vec2 uv = gl_FragCoord.xy / u_WindowSize.xy;
gl_FragColor = texture2D(iChannel0,vec2(uv.x,1.0-uv.y)) * gl_Color;
}