Skip to content

Instantly share code, notes, and snippets.

View greenboxal's full-sized avatar
🏵️
GitHub Gold Member

Jonathan Lima greenboxal

🏵️
GitHub Gold Member
View GitHub Profile
require 'ShaderLib'
### Syntax:
# shader "name": A single shader definition
# version number: GLSL number
# input: Input for vertex data
# parameters: Uniforms
# globals: Varying(in - out)
# pass: Single pass
# state |s|: Defines the states to be applied to the GraphicsDevice
### Syntax:
# shader "name": A single shader definition
# version number: GLSL number
# input: Input for vertex data
# parameters: Uniforms
# globals: Varying(in - out)
# pass: Single pass
# state |s|: Defines the states to be applied to the GraphicsDevice
# include "name": Includes a file, pure GLSL code. Path is relative to current file
# vertex %{ code }: Vertex Shader
// Shader1.rb
// Simple/Simple -> Simple/Fallback
// Pass 0
#version 400
#if defined(GB_VERTEX)
in vec3 iPositon;
in vec3 iNormal;
in vec2 iTexcoord;
unsafe
{
if (parameter.Parameter.Type == EffectParameterType.Double)
{
fixed (byte* data = &parameter.Data[0])
GL.Uniform1(parameter.Parameter.Slot, parameter.Parameter.RowCount * parameter.Parameter.ColumnCount, (double*)data);
}
else
{
fixed (byte* data = &parameter.Data[0])
shader "Simple/Simple" do
version 400
input(
:position => [:vec3, :position],
:normal => [:vec3, :normal],
:color => [:vec4, :color]
)
parameters(
:worldViewProjection => :mat4
bool isPrime(int n)
{
int max = (int)sqrt(n);
for (int j = 2; j < max; j++)
if (n % j == 0)
return false;
return true;
}
// Copyright (c) 2013 The GreenBox Development LLC, all rights reserved
//
// This file is a proprietary part of GreenBox3D, disclosing the content
// of this file without the owner consent may lead to legal actions
//
//
// Basic shader test file
//
// TODO:
// * Implement state changing capabilities

Linaeve Topology

Terms

Slave

Non serving capable bot

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DialCrypt
{
static class DialCrypt
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Macfy.MenuBarController">
<Style x:Key="MenuBarWindow" TargetType="{x:Type Window}">
<Setter Property="Height" Value="30"/>
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="local:ScreenDock.Dock" Value="Top"/>
<Setter Property="local:ScreenDock.ReserveHeight" Value="-9"/>