A little help with some settings (if they exist)

Hi guys, I’m using Retroarch for some time now on my Nvidia Shield but i’m wondering if you can help me with some setting stuff. I’m not very clever with that stuff and i’m afraid i’m doing somthing wrong.

1: I have the brightness on my Shield on the lowest setting, but i think Retroarch is still a bit bright to me (for my taste) Is there a way to make the screen a little bit darker in retroarch???

2: This is a tricky question because i dont know how to explain this in english, but i’ll try

Is there a way to reposition the screen by stretching it a little (screen standard 4:3)? I mean i want for example a game like sonic 2 where the first level you notice some glitches on the bottom of the screen to stretch it a little so it falls of screen.

I know that its possible in the video settings, but i want to know if this is also possible to do it on the left and right sides of the screen without changing the standard screen size (4:3)

hope someone can help me out

jef

For the brightness, you can use a shader like this one (copy/paste this text into a document named ‘image-adjustment.glsl’; modify the values in ‘User Settings’ to your liking):

// image adjustment shader
// by hunterk
// licensed GPLv2+

#if defined(VERTEX)

#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying 
#define COMPAT_ATTRIBUTE attribute 
#define COMPAT_TEXTURE texture2D
#endif

#ifdef GL_ES
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING     float _frame_rotation;
struct input_dummy {
    vec2 _video_size;
    vec2 _texture_size;
    vec2 _output_dummy_size;
    float _frame_count;
    float _frame_direction;
    float _frame_rotation;
float _placeholder26;
};
vec4 _oPosition1;
vec4 _r0006;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_VARYING vec4 COL0;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 TEX0;
 
uniform mat4 MVPMatrix;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
    vec4 _oColor;
    vec2 _oTexCoord;
    _r0006 = VertexCoord.x*MVPMatrix[0];
    _r0006 = _r0006 + VertexCoord.y*MVPMatrix[1];
    _r0006 = _r0006 + VertexCoord.z*MVPMatrix[2];
    _r0006 = _r0006 + VertexCoord.w*MVPMatrix[3];
    _oPosition1 = _r0006;
    _oColor = COLOR;
    _oTexCoord = TexCoord.xy;
    gl_Position = _r0006;
    COL0 = COLOR;
    TEX0.xy = TexCoord.xy;
} 
#elif defined(FRAGMENT)

#if __VERSION__ >= 130
#define COMPAT_VARYING in
#define COMPAT_TEXTURE texture
out vec4 FragColor;
#else
#define COMPAT_VARYING varying
#define FragColor gl_FragColor
#define COMPAT_TEXTURE texture2D
#endif

#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING     float _frame_rotation;
struct input_dummy {
    vec2 _video_size;
    vec2 _texture_size;
    vec2 _output_dummy_size;
    float _frame_count;
    float _frame_direction;
    float _frame_rotation;
float _placeholder27;
};
vec4 _ret_0;
float _TMP4;
float _TMP3;
float _TMP2;
float _TMP1;
input_dummy _IN1;
float mod_y;
float _a0011;
COMPAT_VARYING vec4 TEX0;
 
uniform sampler2D Texture;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;

// --USER SETTINGS-- //
#define saturation 1.0 						// color saturation; default 1.0
#define monitor_gamma 2.2 					// gamma setting of your current display; LCD monitors typically have a gamma of 2.2
#define target_gamma 2.4 					// the gamma you want the image to have; CRT TVs typically have a gamma of 2.4
#define contrast 1.0 						// image contrast; default 1.0
#define luminance 1.0 						// image luminance; default 1.0
#define bright_boost 0.0					// adds to the total brightness. Negative values decrease it; Use values between 1.0 (totally white) and -1.0 (totally black); default is 0.0
#define R 1.0		// Red channel saturation
#define G 1.0		// Green channel saturation
#define B 1.0		// Blue channel saturation
// --END USER SETTINGS-- //

vec3 grayscale(vec3 col)
{
   // ATSC grayscale standard
   return vec3(dot(col, vec3(0.2126, 0.7152, 0.0722)));
}


void main()
{
    vec3 _res;
	vec3 gamma;
	vec3 AvgLumin;
	vec3 intensity;
	vec3 satColor;
	vec3 conColor;
	vec3 intermed;
	
    _res = COMPAT_TEXTURE(Texture, TEX0.xy).rgb;
	gamma = vec3(monitor_gamma / target_gamma); // setup ratio of display's gamma vs desired gamma
	AvgLumin = vec3(0.5, 0.5, 0.5);
	intensity = grayscale(_res); // find luminance
	satColor = mix(intensity, _res, saturation); // apply saturation
	conColor = mix(AvgLumin, satColor, contrast);	// apply contrast
	conColor = pow(conColor, 1.0 / vec3(gamma)); // Apply gamma correction
	conColor = clamp(conColor * luminance, 0.0, 1.0); // apply luminance
	conColor += vec3(bright_boost); // apply brightboost
	conColor *= vec3(R, G, B); // apply color channel adjustment
	vec4 _ret_0 = vec4(conColor, 1.0);

    FragColor = _ret_0;
} 
#endif

The Cg version also has cropping but that breaks in the glsl version for some reason…

Sorry but i’m such a noob i never used shaders before but in what kinda format do i have to copy/paste the text, and where do i put the file?

No worries. It’s just a plain ol’ text file that ends in the extension .glsl. You can make it in Notepad++ in Windows and then transfer it to your SD card or whatever.