This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float3 L = vLightDir; // ライトベクトル | |
float3 N = Normal; // 法線ベクトル | |
Out.Color = BaseColor + min(0.40f , BaseLight + max(0.0f, dot(N, L))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------------- | |
// 拡散光 | |
// シェーダはモデルに対して適用する | |
// ---------------------------------------------------------------- | |
// ---------------------------------------------------------------- | |
// アプリケーション側で設定する変数 | |
// ---------------------------------------------------------------- | |
float4x4 mWVP; // ローカル-ワールド-ビュー-射影まで |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Shader::SuperRender_Lambert_Lock(Geometry& pThing, float X, float Y, float Z) { | |
// ワールドトランスフォーム | |
D3DXMatrixTranslation(&pThing.matWorld, X, Y, Z); | |
pDevice->SetTransform(D3DTS_WORLD, &pThing.matWorld); | |
ViewTrans(); // ビュー, プロジェクショントランスフォーム | |
m_pEffect->SetTechnique(m_hTechnique); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int number = 100; | |
printf("%d", &number); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int number = 100; // 実際に扱うデータ | |
int* numberP = &number; // ポインタ変数にnumberのアドレスを代入 | |
printf("%d \n", numberP); // numberのアドレスを表示 | |
printf("%d \n", *numberP); // numberの中身を表示 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void func(int* n) { // 変数のアドレスを受け取るという意味 | |
*n = 333; // 受け取ったアドレスの中身(*n)に333を入れる | |
} | |
int main() | |
{ | |
int number = 100; // 実際に扱うデータ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------------ | |
// 金属反射 | |
// ------------------------------------------------------------------------ | |
// ------------------------------------------------------------------------ | |
// グローバル変数 | |
// ------------------------------------------------------------------------ | |
float4x4 mWVP; // ローカル→射影まで変換する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 視点位置を確定 | |
g_position = ::Effekseer::Vector3D(0.0f, 0.50f, 15.0f); | |
MessageBox(NULL, "g_poscamera", "DEBUG", MB_OK); | |
// 投影行列を設定 | |
g_renderer->SetProjectionMatrix( | |
::Effekseer::Matrix44().PerspectiveFovLH(90.0f / 180.0f * 3.14f, (float)1920 / (float)1080, 1.0f, 100.0f)); | |
MessageBox(NULL, "g_perspective", "DEBUG", MB_OK); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <ios> | |
#include <iomanip> | |
#pragma warning(disable:4996) | |
using namespace std; | |
const int DECK_NUM = 40; // デッキの総枚数 | |
int main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "DxLib.h" | |
#include <math.h> | |
const float DEGTORAD = 0.017453293f; // 度数表記をラジアンに変換する定数 | |
int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int) { | |
// ---ここから設定--- | |
ChangeWindowMode(TRUE), SetMainWindowText("斜め方向に移動する玉"), SetGraphMode(640, 480, 32), | |
SetDoubleStartValidFlag(TRUE); DxLib_Init(), SetDrawScreen(DX_SCREEN_BACK); | |
// ---ここまで設定--- |
OlderNewer