HSP¥Ý¡¼¥¿¥ë
¥µ¥¤¥È¥Þ¥Ã¥× ¤ªÌ䤤¹ç¤ï¤»


HSPTV!·Ç¼¨ÈÄ


̤²ò·è ²ò·è Ää»ß ºï½üÍ×ÀÁ

2023
0324
¥®¥Ð¥í¥¦hgimg4¤Î¥ª¥Õ¥¹¥¯¥ê¡¼¥ó¥Ð¥Ã¥Õ¥¡¤Î¥Þ¥Æ¥ê¥¢¥ë¤Ë¤Ä¤¤¤Æ2²ò·è


¥®¥Ð¥í¥¦

¥ê¥ó¥¯

2023/3/24(Fri) 11:37:40|NO.99187

hgimg4¤Ë¤Æ¡¢¥ª¥Õ¥¹¥¯¥ê¡¼¥ó¥Ð¥Ã¥Õ¥¡¤òºîÀ®¤·¡¢¤½¤Î¥Ð¥Ã¥Õ¥¡¤Î¥Þ¥Æ¥ê¥¢¥ë¤òÄ̤¸¤Æ¥·¥§¡¼¥À¡¼¤ËÃͤòÁ÷¤ê¤¿¤¤¤È»×¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¢¤¦¤Þ¤¯Á÷¤ì¤Ê¤¯¤Æº¤¤Ã¤Æ¤ª¤ê¤Þ¤¹¡£
¤¹¤ß¤Þ¤»¤ó¤¬¡¢¤´»ØƳ¤¤¤¿¤À¤±¤Þ¤»¤ó¤Ç¤·¤ç¤¦¤«¡£

°Ê²¼¡¢¤ï¤«¤ê¤ä¤¹¤¤¤Î¤Ç¡¢¾¡¼ê¤Ê¤¬¤é¡¢buhio¤µ¤ó¤ÎÇÈ¥·¥§¡¼¥À¡¼(https://hsp.tv/play/pforum.php?mode=all&num=99040)¤Ë¼ê¤ò²Ã¤¨¤¿¤â¤Î¤òÎã¤È¤·¤Æµó¤²¤µ¤»¤Æ¤¤¤¿¤À¤­¤Þ¤¹¡£
¤è¤í¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£



#include "hgimg4.as" ;hgimg4

screen 0,640,480
setcls CLSMODE_SOLID, $000000 ; ²èÌÌ¥¯¥ê¥¢ÀßÄê

gpreset

camera_fov=45:camera_aspect=1.5f:camera_near=0.5f:camera_far=768*10:camera_sw=0
gpcamera id_camera, camera_fov, camera_aspect, camera_near, camera_far,camera_sw ; ¥«¥á¥é¤È¤·¤ÆÀßÄꤹ¤ë
gpusecamera id_camera ; »ÈÍѤ¹¤ë¥«¥á¥é¤òÁªÂò¤¹¤ë
setpos id_camera,0,50,600
gplookat id_camera,0,0,0


buffer 1 , ginfo_sx ,ginfo_sy , screen_offscreen //¥ª¥Õ¥¹¥¯¥ê¡¼¥ó¥Ð¥Ã¥Õ¥¡ºîÀ®
gpgetmat bufmat , 1 ,GPGETMAT_OPT_SCRMAT //¥ª¥Õ¥¹¥¯¥ê¡¼¥ó¤Î¥Þ¥Æ¥ê¥¢¥ë¤ò¼èÆÀ


gpload id_model,"res/wave.gpb"//³Ê»Ò¤ËÇȤΥƥ¯¥¹¥Á¥ã¤òÄ¥¤Ã¤¿¥â¥Ç¥ë¤òÆɹþ
setscale id_model,5,5,5

gpnodeinfo id_mat,id_model, GPNODEINFO_MATERIAL,"obj1"//¥â¥Ç¥ë¤Î¥á¥Ã¥·¥å¤ËÂбþ¤¹¤ë¥Þ¥Æ¥ê¥¢¥ë

_time=0.0f
//--------------------------------------------------
*main

gsel 1
redraw 0


gpmatprm1 id_mat,"u_time",_time/2000 //<-------¤³¤Ã¤Á¤ÏÄ̾ïÄ̤ê
//gpmatprm1 bufmat,"u_time",_time/2000 //<-------¤³¤Ã¤Á¤â¾å¤ÈƱ¤¸·ë²Ì¤Ë¤Ê¤ë¤Ï¤º¤Ç¤Ï¡©¡©¡©

_time++

gpdraw ; 3DÉÁ²è¹¹¿·



gsel 0
pos 0,0
celput 1 , , 1.0 , 1.0

redraw 1
await 1000/60
goto *main


;//////////////////////////¤³¤³¤«¤é¥·¥§¡¼¥À¡¼
;textured.vert¤ò²þÊÑ¢ªtextured_wave.vert¤Ë̾Á°Êѹ¹

///////////////////////////////////////////////////////////
// Uniforms
uniform mat4 u_worldViewProjectionMatrix;
uniform float u_time;//¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ªÄɲùàÌÜ

¡¦¡¦¡¦¾Êά

void main()
{
vec4 position = getPosition();
position[1] += sin(position[0] + u_time* 100);//¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ª¢ªÄɲùàÌÜ
gl_Position = u_worldViewProjectionMatrix * position;

¡¦¡¦¡¦¾Êά



¤³¤Îµ­»ö¤ËÊÖ¿®¤¹¤ë


buhio

¥ê¥ó¥¯

2023/3/24(Fri) 19:09:07|NO.99188

¥®¥Ð¥í¥¦¤µ¤ó¡¢¤³¤ó¤Ë¤Á¤ï

¸¡¾Ú¤Ç¤­¤Æ¤¤¤Ê¤¤¤Ç¤¹¤¬
­¡buffer¤Ç½é´ü²½¤¹¤ëÁ°¤Ë¡¢gpusershader¤Ç¡¢¥·¥§¡¼¥À¡¼¤ò»ØÄꤷ¤Æ´ØÏ¢ÉÕ¤±¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¤ó¤¸¤ã¤Ê¤¤¤«¤È¤¤¤¦¤Î¤¬1ÅÀ
¡ÊHELP»²¾È¡Ë

­¢²èÌ̥Хåե¡¤Ë¡¢u_time¤ÎÃͤòÁ÷¤Ã¤Æ¤â¡¢ÄºÅÀ¥Ç¡¼¥¿¤¬¤Ê¤¤(³Ê»Ò¾õ¤ÎĺÅÀ¤¬¤Ê¤¤¡Ë¤Î¤Ç¡¢²¿¤âµ¯¤³¤é¤Ê¤¤²èÌ̤ˤʤë¤ó¤¸¤ã¤Ê¤¤¤«¤Ê¡©
¡¡²èÌ̥Хåե¡¤Ï¡¢¥Õ¥é¥°¥á¥ó¥È¥·¥§¡¼¥À¡¼¤Ç¡¢½ñ¤­´¹¤¨¤ë¤Î¤¬¥á¥¤¥ó¤Ë¤Ê¤ë¤«¤â¡Ê¼«¿®¤Ê¤·¡Ë

¤´¤á¤ó¤Ê¤µ¤¤¡£¤Á¤ã¤ó¤È¸¡¾Ú¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¤½¤ó¤Êµ¤¤¬¤·¤Þ¤·¤¿¡£
¤É¤¦¤¤¤¦¤³¤È¤¬¤ä¤ê¤¿¤¤¤ó¤Ç¤·¤ç¤¦¤«¡©(^^¢ö
¥·¥§¡¼¥À¡¼Æñ¤·¤¤¤Ç¤¹¤è¤Í¡Á¡Á



¥®¥Ð¥í¥¦

¥ê¥ó¥¯

2023/3/25(Sat) 08:37:02|NO.99193

buhio¤µ¤ó¡¢¤´²óÅú¤¤¤¿¤À¤­¡¢¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
¤Þ¤¿¡¢¾¡¼ê¤Ë¥¹¥¯¥ê¥×¥È¤ò»ÈÍѤ·¤¿¤³¤È¤Ë¤Ä¤¤¤Æ¤Ï¤´ÍƼϤò´ê¤¤¤Þ¤¹¡£m(_ _;)m¤¹¤ß¤Þ¤»¤ó¤Ã¤Ã

gpusershader¤Ç¤¹¤Í¡¢¡¢¡¢¤³¤ó¤Ê¼öʸ¤¬¤¢¤Ã¤¿¤È¤ï¡£¡£¡£
hgimg4¤Ë¤Ä¤¤¤Æ¤Û¤Ü¤Û¤Ü½é¿´¼Ô¤Ê¤â¤Î¤Ç¤¹¤ß¤Þ¤»¤ó¤Ç¤¹¡£

¤Ç¡¢¤ä¤ê¤¿¤¤¤³¤È¤Ê¤Î¤Ç¤¹¤¬¡¢¥Ð¥Ã¥¯¥Ð¥Ã¥Õ¥¡¤Î¥Þ¥Æ¥ê¥¢¥ë¤òÃç²ð¤È¤·¤Æ¥ª¥Ö¥¸¥§¥¯¥È¤¬»ý¤Ä¥·¥§¡¼¥À¡¼¤Ë¡¢ÃͤȤ«¹ÔÎó¤È¤«ÅϤ»¤Ê¤¤¤Î¤«¤Ê¡¼¡¢¤È»×¤Ã¤¿¤Î¤Ç¤¹¡£
gl_useProgram()¤ß¤¿¤¤¤Ê´¶¤¸¤Ç¡£
¤É¤¦¤ä¤é¤³¤ì¤ÏŪ³°¤ì¤ß¤¿¤¤¡£¤ªÃѤº¤«¤·¤¤¡£

¤·¤«¤·¡¢¤ª¤«¤²ÍͤÇÊ̤ÎÊýË¡¤ò»×¤¤¤Ä¤­¤Þ¤·¤¿¡£


¤¿¤·¤«¤Ë¥·¥§¡¼¥À¡¼¤ÏÆñ¤·¤¤¤Ç¤¹¤Í¡£
hgimg4¤Ègameplay3D¤ÎÆâÉô¤¬¤É¤¦¤Ê¤Ã¤Æ¤ó¤Î¤«¤ï¤«¤ó¤Ê¤¤¤·¡¢Ê£»¨¤Ã¤Ý¤¤¤Ç¤¹¤·¤Í¤§¡£
¤Ç¤â³Ú¤·¤¤¡£

¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£



ONION software Copyright 1997-2023(c) All rights reserved.