Latest compatible version of Classicube from the original GitHub repository (https://github.com/ClassiCube/ClassiCube) that can be compiled on Classicube for PowerMac PPC running Mac OS X 10.4.
This commit is contained in:
103
misc/vita/Makefile
Normal file
103
misc/vita/Makefile
Normal file
@@ -0,0 +1,103 @@
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
$(warning "Please set VITASDK variables in your environment. For example:")
|
||||
$(warning export VITASDK=/usr/local/vitasdk)
|
||||
$(error Failed to find VitaSDK installation)
|
||||
endif
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Configurable options
|
||||
#---------------------------------------------------------------------------------
|
||||
# Name of the final output
|
||||
TARGET := ClassiCube-vita
|
||||
# List of directories containing source code
|
||||
SOURCE_DIRS := src src/psvita third_party/bearssl/src
|
||||
# Directory where object files are placed
|
||||
BUILD_DIR := build/vita
|
||||
|
||||
PROJECT_TITLE := ClassiCube
|
||||
PROJECT_TITLEID := CUBE00200
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
C_FILES = $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
|
||||
OBJS = $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o)))
|
||||
|
||||
CFLAGS = -Ithird_party/bearssl/inc -O1
|
||||
|
||||
LDFLAGS = -Wl,-q
|
||||
LIBS = -lm -lSceDisplay_stub -lSceCtrl_stub -lSceTouch_stub -lSceGxm_stub -lSceCommonDialog_stub -lSceAppUtil_stub
|
||||
|
||||
# Dependency tracking
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d
|
||||
DEPFILES := $(OBJS:%.o=%.d)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Compiler tools
|
||||
#---------------------------------------------------------------------------------
|
||||
PREFIX := $(VITASDK)/bin/arm-vita-eabi-
|
||||
VITA_AS := $(PREFIX)as
|
||||
VITA_CC := $(PREFIX)gcc
|
||||
VITA_CXX:= $(PREFIX)g++
|
||||
VITA_STRIP := $(PREFIX)strip
|
||||
|
||||
PACK_VPK := $(VITASDK)/bin/vita-pack-vpk
|
||||
MAKE_FSELF := $(VITASDK)/bin/vita-make-fself
|
||||
MKSOFEX := $(VITASDK)/bin/vita-mksfoex
|
||||
ELF_CREATE := $(VITASDK)/bin/vita-elf-create
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
default: $(BUILD_DIR) $(TARGET).vpk
|
||||
|
||||
$(BUILD_DIR):
|
||||
mkdir -p $(BUILD_DIR)
|
||||
|
||||
clean:
|
||||
rm $(TARGET).velf $(TARGET).elf $(TARGET).vpk param.sfo eboot.bin $(OBJS)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# executable generation
|
||||
#---------------------------------------------------------------------------------
|
||||
$(TARGET).vpk: eboot.bin param.sfo
|
||||
$(PACK_VPK) -s param.sfo -b eboot.bin -a misc/vita/sce_sys/ICON0.png=sce_sys/ICON0.png $(TARGET).vpk
|
||||
|
||||
eboot.bin: $(TARGET).velf
|
||||
$(MAKE_FSELF) $(TARGET).velf eboot.bin
|
||||
|
||||
param.sfo:
|
||||
$(MKSOFEX) -s TITLE_ID="$(PROJECT_TITLEID)" "$(PROJECT_TITLE)" param.sfo
|
||||
|
||||
$(TARGET).velf: $(TARGET).elf
|
||||
$(VITA_STRIP) -g $<
|
||||
$(ELF_CREATE) $< $@
|
||||
|
||||
$(TARGET).elf: $(OBJS)
|
||||
$(VITA_CC) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# object generation
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD_DIR)/%.o : src/%.c
|
||||
$(VITA_CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o : src/psvita/%.c
|
||||
$(VITA_CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o : third_party/bearssl/src/%.c
|
||||
$(VITA_CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Dependency tracking
|
||||
#---------------------------------------------------------------------------------
|
||||
$(DEPFILES):
|
||||
|
||||
include $(wildcard $(DEPFILES))
|
||||
9
misc/vita/colored_alpha_f.cg
Normal file
9
misc/vita/colored_alpha_f.cg
Normal file
@@ -0,0 +1,9 @@
|
||||
float4 main
|
||||
(
|
||||
float4 out_color: COLOR
|
||||
) : COLOR
|
||||
{
|
||||
if (out_color.a < 0.5) discard;
|
||||
|
||||
return out_color;
|
||||
}
|
||||
BIN
misc/vita/colored_alpha_f.gxp
Normal file
BIN
misc/vita/colored_alpha_f.gxp
Normal file
Binary file not shown.
21
misc/vita/colored_alpha_f.h
Normal file
21
misc/vita/colored_alpha_f.h
Normal file
@@ -0,0 +1,21 @@
|
||||
const char colored_alpha_f[304] = {
|
||||
0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x00, 0x03, 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x90, 0x3a, 0x03, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x0f, 0xa0, 0xd0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x44, 0xfa,
|
||||
0x8c, 0x80, 0x03, 0x90, 0x91, 0xc6, 0x89, 0x48, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x10, 0x81, 0x91,
|
||||
0x80, 0x00, 0x00, 0xe0, 0x08, 0x00, 0x81, 0x55, 0x01, 0x00, 0x0a, 0x30, 0x85, 0x01, 0x88, 0x48,
|
||||
0x00, 0x00, 0x00, 0xf0, 0x06, 0x04, 0x30, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x04, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xfa, 0x02, 0x80, 0x19, 0xa0, 0x7e, 0x0d, 0x80, 0x40,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00
|
||||
};
|
||||
7
misc/vita/colored_f.cg
Normal file
7
misc/vita/colored_f.cg
Normal file
@@ -0,0 +1,7 @@
|
||||
float4 main
|
||||
(
|
||||
float4 out_color : COLOR
|
||||
) : COLOR
|
||||
{
|
||||
return out_color;
|
||||
}
|
||||
BIN
misc/vita/colored_f.gxp
Normal file
BIN
misc/vita/colored_f.gxp
Normal file
Binary file not shown.
16
misc/vita/colored_f.h
Normal file
16
misc/vita/colored_f.h
Normal file
@@ -0,0 +1,16 @@
|
||||
const char colored_f[212] = {
|
||||
0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x00, 0x03, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x90, 0x3a, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x0f, 0xa0, 0xd0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xfa, 0x02, 0x80, 0x19, 0xa0,
|
||||
0x7e, 0x0d, 0x80, 0x40
|
||||
};
|
||||
10
misc/vita/colored_v.cg
Normal file
10
misc/vita/colored_v.cg
Normal file
@@ -0,0 +1,10 @@
|
||||
void main(
|
||||
float3 in_position,
|
||||
float4 in_color,
|
||||
uniform float4x4 mvp_matrix,
|
||||
out float4 out_position: POSITION,
|
||||
out float4 out_color: COLOR)
|
||||
{
|
||||
out_position = mul(mvp_matrix, float4(in_position, 1.0f));
|
||||
out_color = in_color;
|
||||
}
|
||||
BIN
misc/vita/colored_v.gxp
Normal file
BIN
misc/vita/colored_v.gxp
Normal file
Binary file not shown.
22
misc/vita/colored_v.h
Normal file
22
misc/vita/colored_v.h
Normal file
@@ -0,0 +1,22 @@
|
||||
const char colored_v[320] = {
|
||||
0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x00, 0x03, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x90, 0x3a, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x08,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xfa, 0x80, 0x00, 0x08, 0x83, 0x21, 0x1d, 0x80, 0x38,
|
||||
0x02, 0x80, 0x81, 0xaf, 0x9c, 0x0d, 0x80, 0x40, 0x00, 0xa2, 0x3d, 0xc0, 0x81, 0x30, 0x90, 0x18,
|
||||
0x00, 0x00, 0x20, 0xa0, 0x00, 0x50, 0x27, 0xfb, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x2c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x25, 0x00, 0x00, 0x00, 0x01, 0xe4, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x69, 0x6e, 0x5f, 0x63,
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x6d, 0x76, 0x70, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00
|
||||
};
|
||||
60
misc/vita/gxp_to_c.c
Normal file
60
misc/vita/gxp_to_c.c
Normal file
@@ -0,0 +1,60 @@
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// Inspired by the public domain bin2c https://github.com/gwilymk/bin2c
|
||||
// TODO: log errors
|
||||
void convert_gxp(const char* src) {
|
||||
char* copy = strdup(src);
|
||||
char* name = strtok(copy, ".");
|
||||
char dst[256];
|
||||
sprintf(dst, "%s.h", name);
|
||||
printf(" %s --> %s\n", src, dst);
|
||||
|
||||
FILE* file_in = fopen(src, "r");
|
||||
if (!file_in) return;
|
||||
|
||||
FILE* file_out = fopen(dst, "w");
|
||||
if (!file_out) return;
|
||||
|
||||
fseek(file_in, 0, SEEK_END);
|
||||
int file_size = ftell(file_in);
|
||||
fseek(file_in, 0, SEEK_SET);
|
||||
|
||||
char* data = malloc(file_size);
|
||||
fread(data, file_size, 1, file_in);
|
||||
fclose(file_in);
|
||||
|
||||
int comma = 0;
|
||||
fprintf(file_out, "const char %s[%i] = {", name, file_size);
|
||||
|
||||
for (int i = 0; i < file_size; i++)
|
||||
{
|
||||
if (comma) fprintf(file_out, ", ");
|
||||
if ((i % 16) == 0) fprintf(file_out, "\n\t");
|
||||
|
||||
fprintf(file_out, "0x%.2x", data[i] & 0xFF);
|
||||
comma = 1;
|
||||
}
|
||||
|
||||
fprintf(file_out, "\n};");
|
||||
fclose(file_out);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
struct dirent* e;
|
||||
DIR* d = opendir(".");
|
||||
if (!d) return 0;
|
||||
|
||||
while ((e = readdir(d))) {
|
||||
printf("checking %s\n", e->d_name);
|
||||
|
||||
if (strstr(e->d_name, ".gxp")) {
|
||||
convert_gxp(e->d_name);
|
||||
}
|
||||
}
|
||||
|
||||
closedir(d);
|
||||
return 0;
|
||||
}
|
||||
9
misc/vita/readme.txt
Normal file
9
misc/vita/readme.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Shaders on the PS Vita use the proprietary .gxp binary format
|
||||
|
||||
To compile CG shaders to .gxp you need to use
|
||||
1) Extract libshacccg.suprx - see https://cimmerian.gitbook.io/vita-troubleshooting-guide/shader-compiler/extract-libshacccg.suprx
|
||||
2) Use vitaShaRK to compile the CG shader (see sample 3 in https://github.com/Rinnegatamante/vitaShaRK for some reference)
|
||||
|
||||
You can then use compiled gxp_to_c to convert all the .gxp shaders into .h files, which src/Graphics_PSVita.c can then include
|
||||
|
||||
Note that you only need to perform these steps if you want to compile modified shaders - you don't need libshacccg.suprx to run ClassiCube
|
||||
BIN
misc/vita/sce_sys/ICON0.png
Normal file
BIN
misc/vita/sce_sys/ICON0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
12
misc/vita/textured_alpha_f.cg
Normal file
12
misc/vita/textured_alpha_f.cg
Normal file
@@ -0,0 +1,12 @@
|
||||
float4 main
|
||||
(
|
||||
uniform sampler2D tex,
|
||||
float4 out_color : COLOR,
|
||||
float2 out_texcoord : TEXCOORD0
|
||||
) : COLOR
|
||||
{
|
||||
float4 color = tex2D(tex, out_texcoord) * out_color;
|
||||
|
||||
if (color.a < 0.5) discard;
|
||||
return color;
|
||||
}
|
||||
BIN
misc/vita/textured_alpha_f.gxp
Normal file
BIN
misc/vita/textured_alpha_f.gxp
Normal file
Binary file not shown.
26
misc/vita/textured_alpha_f.h
Normal file
26
misc/vita/textured_alpha_f.h
Normal file
@@ -0,0 +1,26 @@
|
||||
const char textured_alpha_f[372] = {
|
||||
0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x00, 0x03, 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x90, 0x3a, 0x03, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0xa9, 0xd0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x44, 0xfa,
|
||||
0x02, 0x00, 0x84, 0xa0, 0x86, 0x41, 0xa4, 0x08, 0x43, 0x00, 0xc4, 0xa0, 0x8a, 0x41, 0xc0, 0x08,
|
||||
0x8c, 0x81, 0x03, 0x90, 0x91, 0xc6, 0x89, 0x48, 0x00, 0x01, 0x00, 0xe0, 0x02, 0x10, 0x81, 0x91,
|
||||
0x80, 0x00, 0x00, 0xe0, 0x0a, 0x00, 0x81, 0x55, 0x01, 0x00, 0x0a, 0xb0, 0x85, 0x01, 0x88, 0x48,
|
||||
0x00, 0x00, 0x00, 0xf0, 0x06, 0x04, 0x30, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x04, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xfa, 0x06, 0x82, 0x19, 0xa0, 0x7e, 0x0d, 0x80, 0x40,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
|
||||
0x30, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x74, 0x65, 0x78, 0x00
|
||||
};
|
||||
9
misc/vita/textured_f.cg
Normal file
9
misc/vita/textured_f.cg
Normal file
@@ -0,0 +1,9 @@
|
||||
float4 main
|
||||
(
|
||||
uniform sampler2D tex,
|
||||
float4 out_color : COLOR,
|
||||
float2 out_texcoord : TEXCOORD0
|
||||
) : COLOR
|
||||
{
|
||||
return tex2D(tex, out_texcoord) * out_color;
|
||||
}
|
||||
BIN
misc/vita/textured_f.gxp
Normal file
BIN
misc/vita/textured_f.gxp
Normal file
Binary file not shown.
20
misc/vita/textured_f.h
Normal file
20
misc/vita/textured_f.h
Normal file
@@ -0,0 +1,20 @@
|
||||
const char textured_f[288] = {
|
||||
0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x00, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x05, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x90, 0x3a, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0xa9, 0xd0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xfa, 0x00, 0x00, 0x00, 0x00,
|
||||
0x40, 0x09, 0x00, 0xf8, 0x02, 0x80, 0x99, 0xaf, 0xbc, 0x0d, 0xc0, 0x40, 0x06, 0x82, 0xb9, 0xaf,
|
||||
0xbc, 0x0d, 0x80, 0x40, 0x7c, 0x0f, 0x04, 0x00, 0x86, 0x47, 0xa4, 0x10, 0x30, 0x00, 0x00, 0x00,
|
||||
0x02, 0x04, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00
|
||||
};
|
||||
13
misc/vita/textured_v.cg
Normal file
13
misc/vita/textured_v.cg
Normal file
@@ -0,0 +1,13 @@
|
||||
void main(
|
||||
float3 in_position,
|
||||
float4 in_color,
|
||||
float2 in_texcoord,
|
||||
uniform float4x4 mvp_matrix,
|
||||
out float4 out_position : POSITION,
|
||||
out float4 out_color : COLOR,
|
||||
out float2 out_texcoord: TEXCOORD0)
|
||||
{
|
||||
out_position = mul(mvp_matrix, float4(in_position, 1.0f));
|
||||
out_color = in_color;
|
||||
out_texcoord = in_texcoord;
|
||||
}
|
||||
BIN
misc/vita/textured_v.gxp
Normal file
BIN
misc/vita/textured_v.gxp
Normal file
Binary file not shown.
24
misc/vita/textured_v.h
Normal file
24
misc/vita/textured_v.h
Normal file
@@ -0,0 +1,24 @@
|
||||
const char textured_v[348] = {
|
||||
0x47, 0x58, 0x50, 0x00, 0x01, 0x05, 0x00, 0x03, 0x5c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x90, 0x3a, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x0a,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xfa, 0x80, 0x00, 0x08, 0x83, 0x21, 0x2d, 0x80, 0x38,
|
||||
0x02, 0x80, 0x81, 0xaf, 0x9c, 0x0d, 0x80, 0x40, 0x00, 0xa2, 0x3d, 0xc0, 0x81, 0x30, 0x90, 0x18,
|
||||
0x00, 0x00, 0x20, 0xa0, 0x00, 0x50, 0x27, 0xfb, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x35, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x31, 0x00, 0x00, 0x00, 0x01, 0xe4, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x69, 0x6e, 0x5f, 0x63,
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x69, 0x6e, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64,
|
||||
0x00, 0x6d, 0x76, 0x70, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00
|
||||
};
|
||||
Reference in New Issue
Block a user