Skip to content

Instantly share code, notes, and snippets.

View tolotratlt's full-sized avatar

tlt tolotratlt

View GitHub Profile
@tolotratlt
tolotratlt / masculinfeminin.c
Last active October 19, 2020 20:50
Masculin/Féminin permet de convertir un mot masculin se terminant en "teur" par "trice" et vice-versa, sans toutefois vérifier la véracité du mot par exemple : perturbateur -> perturbatriceperturbatrice -> perturbateur. Programme 32 bit seulement.
#include <stdio.h>
#include <stdlib.h>
int main()
{
char szMots[254], *p;
scanf("%s", szMots);
@tolotratlt
tolotratlt / UnlitTransparentScroll.shader
Last active October 19, 2020 20:51
Unity 3d unlit transparent shader that scroll horizontally, especially for 2d games.
Shader "Custom/UnlitTransparentScroll" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_ScrollXSpeed ("X Scroll Speed", Range (0,10)) = 2
}
SubShader {
Lighting Off
AlphaTest Greater 0.5
Tags { "RenderType"="Opaque" }
LOD 200
@tolotratlt
tolotratlt / InvertedSphere.cs
Last active February 1, 2023 08:16
Unity Equirectangular unlit shader for inverted (normal) sphere. Only valid for inverted sphere (made under 3d modeling program or procedurally). Does'nt work for classical sphere
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
//NOTE
//put in /Assets/Editor folder
public class InvertedSphere : EditorWindow
@tolotratlt
tolotratlt / BlendCubedSkybox.shader
Last active December 25, 2022 06:37
Blending 6 sided skybox using Unity3D fragment shader
/*Blending 6 Sided skybox. By tlt*/
Shader "Skybox/VertBlendedSkybox"
{
Properties{
_Tint("Tint Color", Color) = (.5, .5, .5, .5)
[Gamma] _Exposure("Exposure", Range(0, 8)) = 1.0
_Rotation("Rotation", Range(0, 360)) = 0
_Blend("Blend", Range(0.0,1.0)) = 0.5